net/http: Cloning a transport and disabling http2 makes requests fail. · Issue #50571 · golang/go · GitHub
More Web Proxy on the site http://driver.im/
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wanted to disable http2 for my http client, by using the tr.TLSNextProto as stated in the doc. However when it's done from a cloned transport it seems to break the transport.
When using a new transport (not cloned) it works correctly.
What did you expect to see?
My transport to correctly work and use HTTP1.1
What did you see instead?
Some http2 handshake error.
net/http: HTTP/1.x transport connection broken: malformed HTTP response \"\\x00\\x00\\x12\\x04\\x00\\x00\\x00\\x00\\x00\\x00\\x03\\x00\\x00\\x00d\\x00\\x04\\x00\\x10\\x00\\x00\\x00\\x06\\x00\\x01\\x00\\x00\\x00\\x00\\x04\\b\\x00\\x00\\x00\\x00\\x00\\x00\\x0f\\x00\\x01\\x00\\x00\\x1e\\a\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x01http2_handshake_failed\"\n\n"
The text was updated successfully, but these errors were encountered:
cyriltovena
changed the title
net/http: Cloning a transport and disabling http2 make requests fails.
net/http: Cloning a transport and disabling http2 makes requests fails.
Jan 12, 2022
cyriltovena
changed the title
net/http: Cloning a transport and disabling http2 makes requests fails.
net/http: Cloning a transport and disabling http2 makes requests fail.
Jan 12, 2022
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Not sure I didn't try
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I wanted to disable http2 for my http client, by using the
tr.TLSNextProto
as stated in the doc. However when it's done from a cloned transport it seems to break the transport.When using a new transport (not cloned) it works correctly.
What did you expect to see?
My transport to correctly work and use HTTP1.1
What did you see instead?
Some http2 handshake error.
The text was updated successfully, but these errors were encountered: