mirror of
https://github.com/W3SLAV/micropython.git
synced 2025-06-20 04:25:34 -04:00

When the websocket closes currently, it does not send a proper "close"-frame, but rather encodes the 0x8800-sequence inside a binary packet, which is wrong. The close packet is a different kind of websocket frame, according to https://www.rfc-editor.org/rfc/rfc6455. This change resolves an error in Firefox when the websocket closes. Signed-off-by: Felix Dörre <felix@dogcraft.de>
15 lines
387 B
Plaintext
15 lines
387 B
Plaintext
b'ping'
|
|
b'ping'
|
|
b'\x81\x04pong'
|
|
b'pingpingpingpingpingpingpingpingpingpingpingpingpingpingpingpingpingpingpingpingpingpingpingpingpingpingpingpingpingpingpingping'
|
|
b'\x81~\x00\x80pongpongpongpongpongpongpongpongpongpongpongpongpongpongpongpongpongpongpongpongpongpongpongpongpongpongpongpongpongpongpongpong'
|
|
b'\x00\x00\x00\x00'
|
|
b''
|
|
b'\x88\x00'
|
|
b'ping'
|
|
b'pong'
|
|
0
|
|
1
|
|
2
|
|
ioctl: EINVAL: True
|