Skip to content

Commit

Permalink
fix message extraction from frame in hybi protocol when the client se…
Browse files Browse the repository at this point in the history
…nds unmasked data
  • Loading branch information
flaviogrossi committed Aug 30, 2013
1 parent 500622d commit 3f69591
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cyclone/websocket.py
Expand Up @@ -299,6 +299,8 @@ def _extractMessageFromFrame(self, data):
payload[k] ^= frame_mask_array[k % 4]

return str(payload)
else:
return data[i:i+self._frame_payload_len]

def sendMessage(self, message, code=0x81):
if isinstance(message, unicode):
Expand Down

0 comments on commit 3f69591

Please sign in to comment.