##// END OF EJS Templates
Backport PR #6003: Set kernel_id before checking websocket...
MinRK -
Show More
@@ -114,12 +114,12 b' class ZMQStreamHandler(websocket.WebSocketHandler):'
114 class AuthenticatedZMQStreamHandler(ZMQStreamHandler, IPythonHandler):
114 class AuthenticatedZMQStreamHandler(ZMQStreamHandler, IPythonHandler):
115
115
116 def open(self, kernel_id):
116 def open(self, kernel_id):
117 self.kernel_id = cast_unicode(kernel_id, 'ascii')
117 # Check to see that origin matches host directly, including ports
118 # Check to see that origin matches host directly, including ports
118 if not self.same_origin():
119 if not self.same_origin():
119 self.log.warn("Cross Origin WebSocket Attempt.")
120 self.log.warn("Cross Origin WebSocket Attempt.")
120 raise web.HTTPError(404)
121 raise web.HTTPError(404)
121
122
122 self.kernel_id = cast_unicode(kernel_id, 'ascii')
123 self.session = Session(config=self.config)
123 self.session = Session(config=self.config)
124 self.save_on_message = self.on_message
124 self.save_on_message = self.on_message
125 self.on_message = self.on_first_message
125 self.on_message = self.on_first_message
General Comments 0
You need to be logged in to leave comments. Login now