Repository navigation
h2c: Update to native net/http HTTP2 client - #183
Merged
Merged
Conversation
This will be managed by the protocol options on the server itself
This removes the use of golang.org/x/net/http2
Also add a test around forceful shutdown
domgoodwin
approved these changes
Aug 11, 2026
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.
This PR gets rid of a bunch of cruft. Our h2c implementation was based on
golang.org/x/net/http2andgolang.org/x/net/http2/h2cwhich are deprecated.Since Go 1.24, we have native HTTP2 implementation in
net/httpand fixes for a lot of the deficiency where we had to manage our own connection draining state. This is now all built in, so we can clean up our implementation.There is a small trade-off, where the
H2cFilterbehaviour of accepting HTTP2 becomes enabled by default (rather than opt in). We've been running internally in this mode for years without issue.