##// END OF EJS Templates
Set kernel_id before checking websocket...
Steven Anton -
Show More
@@ -98,12 +98,12 b' class ZMQStreamHandler(websocket.WebSocketHandler):'
98 class AuthenticatedZMQStreamHandler(ZMQStreamHandler, IPythonHandler):
98 class AuthenticatedZMQStreamHandler(ZMQStreamHandler, IPythonHandler):
99
99
100 def open(self, kernel_id):
100 def open(self, kernel_id):
101 self.kernel_id = cast_unicode(kernel_id, 'ascii')
101 # Check to see that origin matches host directly, including ports
102 # Check to see that origin matches host directly, including ports
102 if not self.same_origin():
103 if not self.same_origin():
103 self.log.warn("Cross Origin WebSocket Attempt.")
104 self.log.warn("Cross Origin WebSocket Attempt.")
104 raise web.HTTPError(404)
105 raise web.HTTPError(404)
105
106
106 self.kernel_id = cast_unicode(kernel_id, 'ascii')
107 self.session = Session(config=self.config)
107 self.session = Session(config=self.config)
108 self.save_on_message = self.on_message
108 self.save_on_message = self.on_message
109 self.on_message = self.on_first_message
109 self.on_message = self.on_first_message
General Comments 0
You need to be logged in to leave comments. Login now