net/http: Adding TLSClientConfig turns HTTP/2 off #20645
Closed
Labels
Comments
This might be connected to #14391 |
The Transport documentation has the following: To explicitly enable HTTP/2 on a transport, use golang.org/x/net/http2 and call ConfigureTransport. |
Thanks a lot for the hint @fraenkel! That fixed the problem. BTW are there any plans to make it work out of the box. Calling |
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
)?go version go1.8.3 linux/amd64
What operating system and processor architecture are you using (
go env
)?GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/slaskawi/go_path"
GORACE=""
GOROOT="/opt/go"
GOTOOLDIR="/opt/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build176707533=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
What did you do?
Adding
TLSClientConfig
tohttp.Transport
turns off HTTP/2 support. Here's an example:The code snipped above generates the following output:
When I removed
TLSClientConfig
the situation went back to normal:The response:
Note that I had to remove entire
TLSClientConfig
. Removing onlyInsecureSkipVerify
doesn't fix the problem.What did you expect to see?
Adding
TLSClientConfig
tohttp.Transport
withInsecureSkipVerify
set totrue
should generate the following output:What did you see instead?
I see the following output (which is wrong):
The text was updated successfully, but these errors were encountered: