From d5c94db0542762163c3e49c648c7c926fa9a81fc Mon Sep 17 00:00:00 2001 From: Joel Martin Date: Thu, 15 Dec 2011 15:35:11 -0600 Subject: [PATCH] Support python 3 with SSL/TLS connections. Need to detect leading TLS/SSL character by number too for python 3. --- websocket.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/websocket.py b/websocket.py index 2b3bacc..cf8f423 100644 --- a/websocket.py +++ b/websocket.py @@ -586,7 +586,7 @@ Sec-WebSocket-Accept: %s\r sock.send(s2b(self.policy_response)) raise self.EClose("Sending flash policy response") - elif handshake[0] in ("\x16", "\x80"): + elif handshake[0] in ("\x16", "\x80", 22, 128): # SSL wrap the connection if not ssl: raise self.EClose("SSL connection but no 'ssl' module")