From 8cfd9dcf6e6bacb68c0bdcd81abb076004b65bea Mon Sep 17 00:00:00 2001 From: MinRK Date: Thu, 2 Feb 2012 22:31:42 -0800 Subject: [PATCH] allow draft76 websockets (Safari) Safari still uses draft76, and Tornado 2.2.0 release disables the access from the draft version by default for security reasons. This simply sets the tornado flag to True, so we can continue to support Safari until it upgrades to the RFC 6455 implementation. --- IPython/frontend/html/notebook/handlers.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/IPython/frontend/html/notebook/handlers.py b/IPython/frontend/html/notebook/handlers.py index 05a06acc4..faba77de4 100644 --- a/IPython/frontend/html/notebook/handlers.py +++ b/IPython/frontend/html/notebook/handlers.py @@ -393,6 +393,14 @@ class ZMQStreamHandler(websocket.WebSocketHandler): else: self.write_message(msg) + def allow_draft76(self): + """Allow draft 76, until browsers such as Safari update to RFC 6455. + + This has been disabled by default in tornado in release 2.2.0, and + support will be removed in later versions. + """ + return True + class AuthenticatedZMQStreamHandler(ZMQStreamHandler):