Repository navigation
http2: preserve large server concurrency limits - #275
Alifarid0011 wants to merge 1 commit into
Conversation
The standard library HTTP/2 implementation replaces stream limits above MaxInt32 with its default. Passing a large uint32 limit through the wrapper therefore reduces the advertised limit to 250; conversion to int also overflows on 32-bit systems. Clamp the configured limit before converting it to int. Keep zero and ordinary values unchanged, document the wrapped limit, and cover the boundary values through the server's initial SETTINGS frame. Fixes golang/go#82497
|
This PR (HEAD: 65821e7) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/net/+/855561. Important tips:
|
|
Message from Gopher Robot: Patch Set 1: Congratulations on opening your first change. Thank you for your contribution! Next steps: Most changes in the Go project go through a few rounds of revision. This can be During May-July and Nov-Jan the Go project is in a code freeze, during which Please don’t reply on this GitHub thread. Visit golang.org/cl/855561. |
|
Message from David Chase: Patch Set 1: Commit-Queue+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/855561. |
|
Message from golang-scoped@luci-project-accounts.iam.gserviceaccount.com: Patch Set 1: Dry run: CV is trying the patch. Bot data: {"action":"start","triggered_at":"2026-10-28T14:40:08Z","revision":"6ef48934cf5e7045d6e396bcd377f3d4d4d8ab4f"} Please don’t reply on this GitHub thread. Visit golang.org/cl/855561. |
|
Message from David Chase: Patch Set 1: -Commit-Queue (Performed by <GERRIT_ACCOUNT_60063> on behalf of <GERRIT_ACCOUNT_7061>) Please don’t reply on this GitHub thread. Visit golang.org/cl/855561. |
|
Message from golang-scoped@luci-project-accounts.iam.gserviceaccount.com: Patch Set 1: This CL has passed the run Please don’t reply on this GitHub thread. Visit golang.org/cl/855561. |
|
Message from golang-scoped@luci-project-accounts.iam.gserviceaccount.com: Patch Set 1: LUCI-TryBot-Result+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/855561. |
Passing a MaxConcurrentStreams value above 2^31-1 through the Go 1.27
wrapper reduces the advertised limit to 250. The standard library replaces
out-of-range values with its default, and converting the uint32 field to
int also overflows on 32-bit systems.
Clamp the value to MaxInt32 before converting it. Zero and ordinary values
keep their current behavior; the legacy implementation is unchanged.
Document the wrapped limit and extend the SETTINGS test to cover zero,
ordinary values, both sides of MaxInt32, and MaxUint32.
Tested the complete http2 subtree, including the legacy suite, using
go1.28-devel_68d3532b. The boundary test also passes with Go 1.26.8 and
actual linux/386 execution. Focused race tests for the server API,
ServeConn and ConfigureServer, and go vet ./http2/... pass.
Fixes golang/go#82497