This fixes several assertion errors that were found in fuzz
testing, for unimplemented portions of the spec. The assertions
were either turned into Python exceptions, or the missing
functionality was implemented.
Frames larger than 4GB are unsupported. Initial reception of
such a frame will result in OSError(EIO) and subsequent operations
on the same websocket will fail because framing has been lost.
Transmitting frames larger than 64kB is unsupported. Attempting
to transmit such a frame will result in OSError(ENOBUFS). Subsequent
operations on the websocket are possible.
Signed-off-by: Jeff Epler <jepler@gmail.com>
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>
This is so that the filename of the test doesn't clash with the module name
itself (being "websocket"), and lead to potential problems executing the
test.
2017-03-10 15:05:08 +11:00
Renamed from tests/extmod/websocket.py.exp (Browse further)