-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
proposal: x/net/http2/h2c: allow to disable http upgrade in h2c #68729
Comments
Related Issues and Documentation
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.) |
I'm not sure if any more work will be done on x/net/http2 as #67816 looks like it's likely to be accepted and explicitly drops support for upgrades. |
Change https://go.dev/cl/602716 mentions this issue: |
#67816 supposed to support But regard on the proposal/pr here, I feel like it could be recognised as an improvement for existing h2c package to allow users use prior knowledge way only. It's nice if it's accept as an intermediate step in h2c until the |
Proposal Details
changes
I add an option
DisableH2CUpgrade
to allow server to ignore the upgrading headers from the clients, it satisfies the bahavior mentioned in rfc7230 section 6.7So after the change, if
DisableH2CUpgrade
is specified, the server will use http/2 to serve http/2 requests while using http1.1 for http1.1 requests.motivation
The H2C smuggle is verbose for a server behind some proxies. As the proxy is not controlled by the service maintainers, and it does need h2c for faster internal communication among servers, the
prior knowledge
way is enough in such scenarios.This PR supports this feature by adding a new option, which is backward compatible as well.
The text was updated successfully, but these errors were encountered: