You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WebSocket server sends error 400 Bad Request when HTTP connection cannot be upgraded to WebSocket what is misleading - recently I had to exchange few emails with someone before I found that he was sending regular HTTP request instead of opening WS.
Expected Behavior
Send error 426 Upgrade Required as specified in RFCs:
The 426 (Upgrade Required) status code indicates that the server refuses to perform the request using the current protocol but might be willing to do so after the client upgrades to a different protocol. The server MUST send an Upgrade header field in a 426 response to indicate the required protocol(s) (Section 7.8).
/version/
The |Sec-WebSocket-Version| header field in the client's
handshake includes the version of the WebSocket Protocol with
which the client is attempting to communicate. If this
version does not match a version understood by the server, the
server MUST abort the WebSocket handshake described in this
section and instead send an appropriate HTTP error code (such
as 426 Upgrade Required) and a |Sec-WebSocket-Version| header
field indicating the version(s) the server is capable of
understanding.
Steps To Reproduce
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered:
sirzooro
changed the title
[BUG] <title>WebSocket server does not send 426 Upgrade Required
[BUG] WebSocket server does not send 426 Upgrade Required
May 2, 2024
Is there an existing issue for this?
Current Behavior
WebSocket server sends error 400 Bad Request when HTTP connection cannot be upgraded to WebSocket what is misleading - recently I had to exchange few emails with someone before I found that he was sending regular HTTP request instead of opening WS.
Expected Behavior
Send error 426 Upgrade Required as specified in RFCs:
RFC 9110 - HTTP Semantics:
RFC 6455 - The WebSocket Protocol
Steps To Reproduce
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: