Ensure that the payload parts in decode_hybi consist of bytes.
This commit is contained in:
parent
602b55c60a
commit
56ab9c70b5
|
|
@ -312,7 +312,7 @@ Sec-WebSocket-Accept: %s\r
|
||||||
offset=full_len - (f['length'] % 4),
|
offset=full_len - (f['length'] % 4),
|
||||||
count=(f['length'] % 4))
|
count=(f['length'] % 4))
|
||||||
c = numpy.bitwise_xor(data, mask).tostring()
|
c = numpy.bitwise_xor(data, mask).tostring()
|
||||||
f['payload'] = b + s2b(c)
|
f['payload'] = s2b(b) + s2b(c)
|
||||||
else:
|
else:
|
||||||
print("Unmasked frame: %s" % repr(buf))
|
print("Unmasked frame: %s" % repr(buf))
|
||||||
f['payload'] = buf[(f['hlen'] + has_mask * 4):full_len]
|
f['payload'] = buf[(f['hlen'] + has_mask * 4):full_len]
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue