-
Notifications
You must be signed in to change notification settings - Fork 321
Closed
Labels
Description
At the moment during a handshake error the server will response with 400 status code for example:
HTTP/1.1 400 Bad Request
Content-Length: <content length>
Content-Type: text/plain; charset=utf-8
websocket protocol violation: Connection header "" does not contain Upgrade
However, wouldn't it be beneficial to respond with 426 status code when incorrect Connection/Upgrade header is given or the HTTP protocol of the request is bellow 1.1?
HTTP/1.1 426 Upgrade Required
Upgrade: WebSocket
Connection: Upgrade
Content-Length: <content length>
Content-Type: text/plain; charset=utf-8
websocket protocol violation: Connection header "" does not contain Upgrade
Also I would appreciate if there would be an option to disable the functionality of Accept
which writes the error to the response and I could handle it "my way".
nhooyr