]> Cypherpunks repositories - gostls13.git/commit
net/http: don't treat an alternate protocol as a known round tripper
authorIan Lance Taylor <iant@golang.org>
Tue, 28 Jan 2020 00:35:28 +0000 (16:35 -0800)
committerIan Lance Taylor <iant@golang.org>
Wed, 29 Jan 2020 04:04:52 +0000 (04:04 +0000)
commitc436eadbc36704012be727457f464d8fbf950638
treee6c5ddf32ec191e14eca1d0d2ff222ecb234c09e
parenta6701d81a04bc84b5851e104b27783395a348832
net/http: don't treat an alternate protocol as a known round tripper

As of CL 175857, the client code checks for known round tripper
implementations, and uses simpler cancellation code when it finds one.
However, this code was not considering the case of a request that uses
a user-defined protocol, where the user-defined protocol was
registered with the transport to use a different round tripper.
The effect was that round trippers that worked with earlier
releases would not see the expected cancellation semantics with tip.

Fixes #36820

Change-Id: I60e75b5d0badcfb9fde9d73a966ba1d3f7aa42b1
Reviewed-on: https://go-review.googlesource.com/c/go/+/216618
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/net/http/client.go
src/net/http/omithttp2.go
src/net/http/transport.go
src/net/http/transport_test.go