Fix split out handshake parsing for Hixie.

Need the scheme to be accessible when constructing the response for
Hixie clients.
This commit is contained in:
Joel Martin 2012-08-14 15:12:48 -05:00
parent 00e9d3bf29
commit d575e571fd
1 changed files with 3 additions and 3 deletions

View File

@ -618,7 +618,7 @@ Sec-WebSocket-Accept: %s\r
self.base64 = True
response = self.server_handshake_hixie % (pre,
h['Origin'], pre, scheme, h['Host'], path)
h['Origin'], pre, self.scheme, h['Host'], path)
if 'base64' in protocols:
response += "%sWebSocket-Protocol: base64\r\n" % pre
@ -690,7 +690,7 @@ Sec-WebSocket-Accept: %s\r
else:
raise
scheme = "wss"
self.scheme = "wss"
stype = "SSL/TLS (wss://)"
elif self.ssl_only:
@ -698,7 +698,7 @@ Sec-WebSocket-Accept: %s\r
else:
retsock = sock
scheme = "ws"
self.scheme = "ws"
stype = "Plain non-SSL (ws://)"
wsh = WSRequestHandler(retsock, address, not self.web)