Draft 75 uses 'Web Socket'.

No detail is too small for The Hixie.  Fixes #64
This commit is contained in:
Ryan Williams
2010-10-03 22:51:15 -07:00
parent ab356de573
commit f9c6a50d83
3 changed files with 3 additions and 2 deletions

View File

@@ -27,6 +27,7 @@ Contributors
* Tavis Rudd * Tavis Rudd
* Sergey Shepelev * Sergey Shepelev
* Chuck Thier * Chuck Thier
* Nick V
* Daniele Varrazzo * Daniele Varrazzo
* Ryan Williams * Ryan Williams

View File

@@ -84,7 +84,7 @@ class WebSocketWSGI(object):
if qs: if qs:
location += '?' + qs location += '?' + qs
if self.protocol_version == 75: if self.protocol_version == 75:
handshake_reply = ("HTTP/1.1 101 WebSocket Protocol Handshake\r\n" handshake_reply = ("HTTP/1.1 101 Web Socket Protocol Handshake\r\n"
"Upgrade: WebSocket\r\n" "Upgrade: WebSocket\r\n"
"Connection: Upgrade\r\n" "Connection: Upgrade\r\n"
"WebSocket-Origin: %s\r\n" "WebSocket-Origin: %s\r\n"

View File

@@ -115,7 +115,7 @@ class TestWebSocket(_TestBase):
result = sock.recv(1024) result = sock.recv(1024)
## The server responds the correct Websocket handshake ## The server responds the correct Websocket handshake
self.assertEqual(result, self.assertEqual(result,
'\r\n'.join(['HTTP/1.1 101 WebSocket Protocol Handshake', '\r\n'.join(['HTTP/1.1 101 Web Socket Protocol Handshake',
'Upgrade: WebSocket', 'Upgrade: WebSocket',
'Connection: Upgrade', 'Connection: Upgrade',
'WebSocket-Origin: http://localhost:%s' % self.port, 'WebSocket-Origin: http://localhost:%s' % self.port,