| Age | Commit message (Collapse) | Author |
|
This fixes several assertion errors that were found in fuzz testing, for
unimplemented portions of the websocket spec. The assertions were either
turned into Python exceptions, or the missing functionality was
implemented.
Split frames are now enabled and work, enabling reception of frames up to
64kB (assuming they are encoded with a 16-bit size field).
Frames with a 64-bit size fields remain unsupported but no longer result in
an assertion error. Instead, 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>
|
|
This work was funded through GitHub Sponsors.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
|
|
See https://black.readthedocs.io/en/stable/the_black_code_style/index.html
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
|
|
Signed-off-by: Damien George <damien@micropython.org>
|
|
This adds the Python files in the tests/ directory to be formatted with
./tools/codeformat.py. The basics/ subdirectory is excluded for now so we
aren't changing too much at once.
In a few places `# fmt: off`/`# fmt: on` was used where the code had
special formatting for readability or where the test was actually testing
the specific formatting.
|
|
As mentioned in #4450, `websocket` was experimental with a single intended
user, `webrepl`. Therefore, we'll make this change without a weak
link `websocket` -> `uwebsocket`.
|
|
|
|
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.
|