Commit 1b8f607d authored by Taddeüs Kroes's avatar Taddeüs Kroes

Improved Frame stringification

parent 3f383b61
...@@ -62,7 +62,7 @@ class Frame(object): ...@@ -62,7 +62,7 @@ class Frame(object):
else: else:
raise Exception('the payload length is too damn high!') raise Exception('the payload length is too damn high!')
if self.masking_key: if mask:
return header + self.masking_key + self.mask_payload() return header + self.masking_key + self.mask_payload()
return header + self.payload return header + self.payload
...@@ -84,7 +84,7 @@ class Frame(object): ...@@ -84,7 +84,7 @@ class Frame(object):
return frames return frames
def __str__(self): def __str__(self):
return '<Frame opcode=%c len=%d>' % (self.opcode, len(self.payload)) return '<Frame opcode=0x%X len=%d>' % (self.opcode, len(self.payload))
def receive_fragments(sock): def receive_fragments(sock):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment