net/http: Server BaseContext & ConnContext not respected for HTTP2 #32476
Labels
Comments
Change https://golang.org/cl/181259 mentions this issue: |
Change https://golang.org/cl/181260 mentions this issue: |
gopherbot
pushed a commit
to golang/net
that referenced
this issue
Jun 7, 2019
…http This is the x/net/http2 half of the fix. The net/http half is in CL 181260. Updates golang/go#32476 Updates golang/go#30694 Change-Id: Ic25c678dad99acc4ae8d679384d9e9a38dc1291c Reviewed-on: https://go-review.googlesource.com/c/net/+/181259 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
CL 167681 (for #30694) introduced the
BaseContext
&ConnContext
fields onhttp.Server
, but they were never wired up inx/net/http2
.The following is a slight modification of the
TestServerContexts
test inserve_test.go
that uses HTTP2:Then
go test
:What did you expect to see?
What did you see instead?
x/net/http2
doesn't use thehttp.Server
context–as it isn't provided to theTLSNextProto
handler–instead creating it's own inserverConnBaseContext
. This code currently lacks theBaseContext
&ConnContext
calls.Also while I'm here, the two panics introduced by CL 167681 (here and here) should have a
http:
prefix./cc @bradfitz
The text was updated successfully, but these errors were encountered: