-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
net/http: changing Transport.Dial to DialContext opts in to HTTP/2 #27011
Labels
FrozenDueToAge
help wanted
NeedsFix
The path to resolution is known, but the work has not been done.
Milestone
Comments
andybons
added
the
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
label
Aug 16, 2018
bradfitz
added
the
NeedsFix
The path to resolution is known, but the work has not been done.
label
Aug 16, 2018
gopherbot
removed
the
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
label
Aug 16, 2018
Change https://golang.org/cl/130256 mentions this issue: |
I thought this was specified in reverse, that using Dial instead of DialContext blocks the use of h2? |
Change https://golang.org/cl/172299 mentions this issue: |
gopherbot
pushed a commit
that referenced
this issue
Apr 16, 2019
Transport.DialerAndTLSConfigSupportsHTTP2 was added just earlier in CL 130256 but we thought of a better name moments after submitting. ForceAttemptHTTP2 is shorter, more direct, and doesn't constrain what we can use it with in the future. Updates #14391 Updates #27011 Change-Id: Ie5fc71bafcbcaa1941b5d49f748b6d710503d477 Reviewed-on: https://go-review.googlesource.com/c/go/+/172299 Reviewed-by: Brad Fitzpatrick <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
FrozenDueToAge
help wanted
NeedsFix
The path to resolution is known, but the work has not been done.
What did you do?
We changed
http.Client
from using the deprecatedtransport.Dial
function to its replacement,transport.DialContext
.What did you expect to see?
Dial
andDialContext
should behave similarly when using the same parameters.What did you see instead?
Using
DialContext
causes Transport to be configured for http/2. The custom dialerDialContext
should not automatically enable http2 as specified in the comment at https://github.com/golang/go/blob/go1.10/src/net/http/transport.go#L228.Does this issue reproduce with the latest release (go1.10.3)?
We noticed this issue in Go 1.10.2 and the offending code hasn't changed in Go 1.10.3.
System details
We deploy our code on linux/amd64.
We will submit a patch for this issue shortly.
The text was updated successfully, but these errors were encountered: