From: Florian Diebold Date: Sat, 17 Sep 2011 22:17:47 +0000 (+0200) Subject: Fix the handling of messages of length 126 in the draft-10 Websocket implementation. X-Git-Tag: v2.1.0~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=662d8ace140c73b13dcafd775731071d82f463e5;p=thirdparty%2Ftornado.git Fix the handling of messages of length 126 in the draft-10 Websocket implementation. --- diff --git a/tornado/websocket.py b/tornado/websocket.py index a65cdc6b7..3a17f93e1 100644 --- a/tornado/websocket.py +++ b/tornado/websocket.py @@ -390,7 +390,7 @@ class WebSocketProtocol8(WebSocketProtocol): finbit = 0 frame = struct.pack("B", finbit | opcode) l = len(data) - if l <= 126: + if l < 126: frame += struct.pack("B", l) elif l <= 0xFFFF: frame += struct.pack("!BH", 126, l)