Tornado handlers for WebSocket <-> ZMQ sockets.
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.
Check Origin == Host or Access-Control-Allow-Origin.
Tornado >= 4 calls this method automatically, raising 403 if it returns False. We call it explicitly in open on Tornado < 4.
meaningless for websockets
Undo the set_default_headers in IPythonHandler
which doesn’t make sense for websockets