Description
Please answer these questions before submitting your issue. Thanks!
-
What version of Go are you using (
go version
)?go version go1.7rc4 darwin/amd64
-
What operating system and processor architecture are you using (
go env
)?GOARCH="amd64"
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin" -
What did you do?
Directly use an
http2.Transport
to set itsAllowHTTP
field to true, to enable HTTP/2 over HTTP (and set DialTLS accordingly, as mentioned here: x/net/http2: support h2c for http2 #14141 (comment)). -
What did you expect to see?
Have access to the same rich set of configuration options as are available on
http.Transport
. -
What did you see instead?
Many configuration options from
http.Transport
are not available onhttp2.Transport
(e.g. controlling idle connections in the ClientConnPool).
As discussed on golang-dev mailing list (https://groups.google.com/forum/#!topic/golang-dev/HmqDsLpTywk), as it currently stands, if we have to directly use the http2.Transport
, we have to give up on a number of configuration options that are present only on http.Transport
. @bradfitz suggested to rename and export the http2.Transport.t1
field to fix this.