From: Florian Diebold Date: Sun, 17 Jul 2011 20:15:21 +0000 (+0200) Subject: Handle the hybi-07 version of the WebSocket protocol with the 08 implementation. X-Git-Tag: v2.1.0~78^2~3^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9d41c834f6a3090f012e0c75ee9b9e93ff2dd822;p=thirdparty%2Ftornado.git Handle the hybi-07 version of the WebSocket protocol with the 08 implementation. There don't seem to be any differences on the server side. --- diff --git a/tornado/websocket.py b/tornado/websocket.py index d9c779a6e..6b32b9774 100644 --- a/tornado/websocket.py +++ b/tornado/websocket.py @@ -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()