Ensure that the payload parts in decode_hybi consist of bytes.

This commit is contained in:
Kim Silkebækken 2011-09-10 22:07:56 +02:00
parent 602b55c60a
commit 56ab9c70b5
1 changed files with 1 additions and 1 deletions

View File

@ -312,7 +312,7 @@ Sec-WebSocket-Accept: %s\r
offset=full_len - (f['length'] % 4),
count=(f['length'] % 4))
c = numpy.bitwise_xor(data, mask).tostring()
f['payload'] = b + s2b(c)
f['payload'] = s2b(b) + s2b(c)
else:
print("Unmasked frame: %s" % repr(buf))
f['payload'] = buf[(f['hlen'] + has_mask * 4):full_len]