Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

http: reject HTTP major version switch mid connection #13421

Closed
wants to merge 1 commit into from

Conversation

bagder
Copy link
Member

@bagder bagder commented Apr 19, 2024

A connection that has seen a HTTP major version now refuses any other major HTTP version in future responses. Previously, a HTTP/1.x connection would just silently accept HTTP/2 or HTTP/3 in the status lines as long as it had support for those built-in. It would then just lead to confusion and badness.

Indirectly Spotted by CodeSonar which identified a duplicate assignment in this function.

Add test 471 to verify

A connection that has seen a HTTP major version now refuses any other
major HTTP version in future responses. Previously, a HTTP/1.x
connection would just silently accept HTTP/2 or HTTP/3 in the status
lines as long as it had support for those built-in. It would then just
lead to confusion and badness.

Indirectly Spotted by CodeSonar which identified a duplicate assignment
in this function.

Add test 471 to verify
@bagder bagder added the HTTP label Apr 19, 2024
@github-actions github-actions bot added the tests label Apr 19, 2024
@bagder bagder closed this in a032e97 Apr 19, 2024
@bagder bagder deleted the bagder/http-switch branch April 19, 2024 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

2 participants