Skip to content

Commit

Permalink
Workaround for mrjoes#105. Don't compress for tornado <4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Wacek committed Aug 31, 2016
1 parent a0a7e5d commit 9be6633
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions sockjs/tornado/websocket.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import tornado
from tornado import escape, gen, websocket

try:
Expand All @@ -7,9 +8,10 @@


class SockJSWebSocketHandler(websocket.WebSocketHandler):
def get_compression_options(self):
# let tornado use compression when Sec-WebSocket-Extensions:permessage-deflate is provided
return {}
if tornado.version_info[0] == 4 and tornado.version_info[1] > 1:
def get_compression_options(self):
# let tornado use compression when Sec-WebSocket-Extensions:permessage-deflate is provided
return {}

def check_origin(self, origin):
# let tornado first check if connection from the same domain
Expand Down

0 comments on commit 9be6633

Please sign in to comment.