Permalink
Browse files

Fix the handling of messages of length 126 in the draft-10 Websocket …

…implementation.
  • Loading branch information...
1 parent 96f057c commit 690081f4811977bcef074d3ff553fd55b609949b @flodiebold committed Sep 17, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 tornado/websocket.py
View
@@ -392,7 +392,7 @@ def _write_frame(self, fin, opcode, data):
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)

0 comments on commit 690081f

Please sign in to comment.