Closed
Description
What did you do?
We changed http.Client
from using the deprecated transport.Dial
function to its replacement, transport.DialContext
.
What did you expect to see?
Dial
and DialContext
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 dialer DialContext
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.