Use *args, **kwargs, log.warn

This commit is contained in:
Kyle Kelley 2014-01-21 21:08:24 -06:00
parent 104275ab73
commit 345de4e674

View File

@ -53,18 +53,18 @@ class ZMQStreamHandler(websocket.WebSocketHandler):
# Check to see that origin matches host directly, including ports
if origin != host:
self.log.critical("Cross Origin WebSocket Attempt.")
self.log.warn("Cross Origin WebSocket Attempt.")
raise web.HTTPError(404)
def _execute(self, transforms, *args, **kwargs):
def _execute(self, *args, **kwargs):
"""Wrap all calls to make sure origin gets checked."""
# Check to see that origin matches host directly, including ports
self.check_origin()
# Pass on the rest of the handling by the WebSocketHandler
super(ZMQStreamHandler, self)._execute(transforms, *args, **kwargs)
super(ZMQStreamHandler, self)._execute(*args, **kwargs)
def clear_cookie(self, *args, **kwargs):
"""meaningless for websockets"""