tungstenite-rs
tungstenite-rs copied to clipboard
Support custom behavior for some handshake error cases
I found that currently the server side of tungstenite will directly drop the connection when encountering some handshake failures (the stream is moved into accept() so it will be dropped when an error occurs).
However I have a requirement to return a valid http response when some websocket related headers are missing (such as the connection upgrade header). Currently tungstenite seems unable to do this.
I wonder if some new accept functions can be added to tungstenite to support this?