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

x/net/http2/h2c: uses obsolete upgrade mechanism #63565

Open
irbekrm opened this issue Oct 16, 2023 · 2 comments
Open

x/net/http2/h2c: uses obsolete upgrade mechanism #63565

irbekrm opened this issue Oct 16, 2023 · 2 comments
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@irbekrm
Copy link
Contributor

irbekrm commented Oct 16, 2023

x/net/http2/h2c package uses HTTP Upgrade headers based mechanism to determine if a connection should be upgraded to h2c.
This mechanism was deprecated by RFC 9113 https://datatracker.ietf.org/doc/html/rfc9113#name-http-2-version-identificatio

Perhaps it makes sense to leave the functionality as is to not break existing clients (?) but would be good to maybe mention the deprecation in code comments and rewrite the other comments that refer to the obsolete RFC 7540 to refer to sections in RFC 9113

@gopherbot gopherbot added this to the Unreleased milestone Oct 16, 2023
@mauri870
Copy link
Member

mauri870 commented Oct 16, 2023

The "h2c" string was previously used as a token for use in the HTTP Upgrade mechanism's Upgrade header field (Section 7.8 of [HTTP]). This usage was never widely deployed and is deprecated by this document. The same applies to the HTTP2-Settings header field, which was used with the upgrade to "h2c".

This usage was never widely deployed I'm not sure If I fully agree with that, h2c seems to be used all over the place

We should be good boys and clarify about it being obsolete with a link to the RFC9113, which is the authoritative source.

@seankhliao seankhliao changed the title x/net: h2c package uses obsolete upgrade mechanism x/net/http2/h2c: uses obsolete upgrade mechanism Oct 16, 2023
@cagedmantis cagedmantis added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Oct 19, 2023
@cagedmantis
Copy link
Contributor

cc @neild @tombergan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

4 participants