Open
Description
Currently, if you close a websocket with code 1006 (which is not allowed), the result is a 1000-code closure:
https://github.com/python-hyper/wsproto/blob/main/src/wsproto/frame_protocol.py#L576-L577
I suspect this should instead be either a 1002 error or an exception, but I'm not certain.
This resulted in a latent bug in hypercorn (an ASGI web server that uses wsproto) where websockets were closed with code 1000 on internal server errors:
pgjones/hypercorn#112
Metadata
Metadata
Assignees
Labels
No labels