From f9c6a50d831738054b147b1d40a111bc1394773c Mon Sep 17 00:00:00 2001 From: Ryan Williams Date: Sun, 3 Oct 2010 22:51:15 -0700 Subject: [PATCH] Draft 75 uses 'Web Socket'. No detail is too small for The Hixie. Fixes #64 --- AUTHORS | 1 + eventlet/websocket.py | 2 +- tests/websocket_test.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/AUTHORS b/AUTHORS index 807b824..5efebc7 100644 --- a/AUTHORS +++ b/AUTHORS @@ -27,6 +27,7 @@ Contributors * Tavis Rudd * Sergey Shepelev * Chuck Thier +* Nick V * Daniele Varrazzo * Ryan Williams diff --git a/eventlet/websocket.py b/eventlet/websocket.py index 75a8753..b2f783f 100644 --- a/eventlet/websocket.py +++ b/eventlet/websocket.py @@ -84,7 +84,7 @@ class WebSocketWSGI(object): if qs: location += '?' + qs 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" "Connection: Upgrade\r\n" "WebSocket-Origin: %s\r\n" diff --git a/tests/websocket_test.py b/tests/websocket_test.py index c73ed8c..4e16ad4 100644 --- a/tests/websocket_test.py +++ b/tests/websocket_test.py @@ -115,7 +115,7 @@ class TestWebSocket(_TestBase): result = sock.recv(1024) ## The server responds the correct Websocket handshake 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', 'Connection: Upgrade', 'WebSocket-Origin: http://localhost:%s' % self.port,