Skip to content
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: http2 transport doesn't respect all http1 Transport fields #14008

bradfitz opened this issue Jan 18, 2016 · 2 comments


None yet
2 participants
Copy link

commented Jan 18, 2016

The http.Transport by default creates a hidden http2.Transport which is supposed to use the settings from the public http.Transport. But the DisableKeepAlive setting isn't propagated.

@bradfitz bradfitz self-assigned this Jan 18, 2016

@bradfitz bradfitz added this to the Go1.6 milestone Jan 18, 2016


This comment has been minimized.

Copy link
Member Author

commented Jan 19, 2016

Also DisableCompression and ResponseHeaderTimeout.

Looking at the fields on ...

Proxy: not applicable (net/http does proxy)
Dial: not applicable (net/http dials and uses it, then passes conn)
DialTLS: same
TLSClientConfig: same
TLSHandshakeTimeout: same
DisableKeepAlives: missing
DisableCompression: missing
MaxIdleConnsPerHost: not applicable; this will be approximately 1 always, or maybe 2 during graceful server shutdown, then promptly 1 again.
ResponseHeaderTimeout: missing

@bradfitz bradfitz changed the title net/http: http2 transport doesn't use http1 Transport.DisableKeepAlives net/http: http2 transport doesn't respect all http1 Transport fields Jan 19, 2016


This comment has been minimized.

Copy link

commented Jan 19, 2016

CL mentions this issue.

gopherbot pushed a commit to golang/net that referenced this issue Jan 19, 2016

http2: make Transport respect http1 Transport settings
The http2 Transport now respects the http1 Transport's
DisableCompression, DisableKeepAlives, and ResponseHeaderTimeout, if
the http2 and http1 Transports are wired up together, as they are in
the upcoming Go 1.6.

Updates golang/go#14008

Change-Id: I2f477f6fe5dbef9d0e5439dfc7f3ec2c0da7f296
Reviewed-by: Andrew Gerrand <>
Run-TryBot: Brad Fitzpatrick <>
TryBot-Result: Gobot Gobot <>

@gopherbot gopherbot closed this in c40a73d Jan 19, 2016

@golang golang locked and limited conversation to collaborators Jan 18, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.