]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Handle the hybi-07 version of the WebSocket protocol with the 08 implementation.
authorFlorian Diebold <flodiebold@gmail.com>
Sun, 17 Jul 2011 20:15:21 +0000 (22:15 +0200)
committerFlorian Diebold <flodiebold@gmail.com>
Sun, 17 Jul 2011 20:15:21 +0000 (22:15 +0200)
There don't seem to be any differences on the server side.

tornado/websocket.py

index d9c779a6e9de0e632dc8477aceff9ab32697ac4f..6b32b977451198d6b97a307c2a849db87c06fc3f 100644 (file)
@@ -76,7 +76,8 @@ class WebSocketHandler(tornado.web.RequestHandler):
         self.open_args = args
         self.open_kwargs = kwargs
 
-        if self.request.headers.get("Sec-WebSocket-Version") == "8":
+        if (self.request.headers.get("Sec-WebSocket-Version") == "8" or
+            self.request.headers.get("Sec-WebSocket-Version") == "7"):
             self.ws_connection = WebSocketProtocol8(self)
             self.ws_connection.accept_connection()