feat: add sec-websocket-version to response headers when request sec-websocket-version is invalid#2291
Merged
lpinca merged 2 commits intowebsockets:masterfrom Jun 28, 2025
samuel871211:add-sec-websocket-version-when-400
Merged
feat: add sec-websocket-version to response headers when request sec-websocket-version is invalid#2291lpinca merged 2 commits intowebsockets:masterfrom samuel871211:add-sec-websocket-version-when-400
sec-websocket-version to response headers when request sec-websocket-version is invalid#2291lpinca merged 2 commits intowebsockets:masterfrom
samuel871211:add-sec-websocket-version-when-400
Conversation
lpinca
approved these changes
Jun 28, 2025
Member
|
FWIW, given that I think it makes sense to drop support for version 8, but it is a breaking change. |
Member
|
Thank you. |
Contributor
Author
I thought so. Do you plan to drop support for version 8? |
Member
|
Maybe, but it is not a priority. Supporting version 8 does not cost anything. |
Contributor
Author
|
Agree, since it does not dramatically reduce the bundle size of this project, and may require a major version bump, I don't see the benefit of it. |
Member
|
The only valid reason is strict compliance with RFC 6455, but it does not worth a major version bump per se. It should be added to the list of breaking changes for the next major version. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
While test locally with postman, send invalid

sec-websocket-version, I found that the server doesn't includesec-websocket-version: 13,8in response headershttps://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Sec-WebSocket-Version
https://datatracker.ietf.org/doc/html/rfc6455#section-4.4
This PR add
sec-websocket-versionto response headers when requestsec-websocket-versionis invalid.