go/src/net
Ian Lance Taylor c436eadbc3 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>
2020-01-29 04:04:52 +00:00
..
http net/http: don't treat an alternate protocol as a known round tripper 2020-01-29 04:04:52 +00:00
internal/socktest all: remove the nacl port (part 1) 2019-10-09 06:14:44 +00:00
mail net/mail: fix new test for systems with different zoneinfo data 2019-10-11 23:48:10 +00:00
rpc all: clean up code with token.IsExported 2019-04-16 14:43:48 +00:00
smtp net/smtp: add missing error check in test 2019-11-11 21:56:37 +00:00
testdata net: use DNS over TCP when use-vc is set in resolv.conf 2019-04-18 18:51:13 +00:00
textproto net/http, net/textproto: add Header.Values, MIMEHeader.Values methods 2019-10-17 18:21:01 +00:00
url net/url: update net/url split comment 2019-11-21 16:01:14 +00:00
addrselect.go net: add AIX operating system 2018-10-10 17:20:53 +00:00
addrselect_test.go
cgo_aix.go net: allow build on aix/ppc64 with cgo 2019-03-19 03:19:53 +00:00
cgo_android.go
cgo_bsd.go
cgo_linux.go
cgo_netbsd.go
cgo_openbsd.go
cgo_resnew.go
cgo_resold.go
cgo_socknew.go
cgo_sockold.go net: allow build on aix/ppc64 with cgo 2019-03-19 03:19:53 +00:00
cgo_solaris.go
cgo_stub.go net: remove non-cgo macOS resolver code 2019-06-06 19:56:56 +00:00
cgo_unix.go all: remove os.ErrTimeout 2019-08-02 17:57:18 +00:00
cgo_unix_test.go net: allow build on aix/ppc64 with cgo 2019-03-19 03:19:53 +00:00
cgo_windows.go
conf.go net: remove non-cgo macOS resolver code 2019-06-06 19:56:56 +00:00
conf_netcgo.go
conf_test.go all: update comment URLs from HTTP to HTTPS, where possible 2018-06-01 21:52:00 +00:00
conn_test.go net: add js/wasm architecture 2018-06-04 16:01:50 +00:00
dial.go net: fix improper Context.Deadline usage in DialContext 2019-11-15 00:03:57 +00:00
dial_test.go net: update renamed test name in comment 2020-01-06 16:21:24 +00:00
dial_unix_test.go net: add AIX operating system 2018-10-10 17:20:53 +00:00
dnsclient.go all: move internal/x to vendor/golang.org/x and revendor using 'go mod vendor' 2019-03-11 20:28:54 +00:00
dnsclient_test.go net: use golang.org/x/net/dns/dnsmessage for DNS resolution 2018-03-15 04:18:11 +00:00
dnsclient_unix.go net: avoid an infinite loop in LookupAddr 2019-10-02 20:54:54 +00:00
dnsclient_unix_test.go net: fix typo in dns client unix test 2019-12-24 16:07:08 +00:00
dnsconfig_unix.go net: use DNS over TCP when use-vc is set in resolv.conf 2019-04-18 18:51:13 +00:00
dnsconfig_unix_test.go net: use DNS over TCP when use-vc is set in resolv.conf 2019-04-18 18:51:13 +00:00
dnsname_test.go net: don't reject domain names with only numbers and hyphens 2018-09-24 17:56:44 +00:00
error_plan9.go net, syscall: make ECONNRESET/ECONNABORTED only temporary for Accept 2018-05-01 14:50:33 +00:00
error_plan9_test.go
error_posix.go all: remove the nacl port (part 1) 2019-10-09 06:14:44 +00:00
error_posix_test.go
error_test.go all: remove the nacl port (part 1) 2019-10-09 06:14:44 +00:00
error_unix.go net: add AIX operating system 2018-10-10 17:20:53 +00:00
error_unix_test.go
error_windows.go net, syscall: make ECONNRESET/ECONNABORTED only temporary for Accept 2018-05-01 14:50:33 +00:00
error_windows_test.go
example_test.go net: document concurrency safety and example for Dialer 2019-09-02 14:47:38 +00:00
external_test.go net: add js/wasm architecture 2018-06-04 16:01:50 +00:00
fd_plan9.go net: add js/wasm architecture 2018-06-04 16:01:50 +00:00
fd_unix.go net: fix improper Context.Deadline usage in DialContext 2019-11-15 00:03:57 +00:00
fd_windows.go net: improve ExampleUDPConn_WriteTo docs 2018-06-26 21:30:43 +00:00
file.go all: remove the nacl port (part 1) 2019-10-09 06:14:44 +00:00
file_plan9.go net: add KeepAlive field to ListenConfig 2019-04-04 14:51:33 +00:00
file_stub.go all: remove the nacl port (part 1) 2019-10-09 06:14:44 +00:00
file_test.go all: remove the nacl port (part 1) 2019-10-09 06:14:44 +00:00
file_unix.go net: add KeepAlive field to ListenConfig 2019-04-04 14:51:33 +00:00
file_windows.go
hook.go net: enable TCP keepalives by default 2018-12-03 16:36:46 +00:00
hook_plan9.go
hook_unix.go all: remove the nacl port (part 1) 2019-10-09 06:14:44 +00:00
hook_windows.go
hosts.go net: use internal/bytealg insetad of linkname tricks 2018-08-21 22:09:23 +00:00
hosts_test.go
interface.go all: remove the nacl port (part 1) 2019-10-09 06:14:44 +00:00
interface_aix.go net: fix fd leak with interfaces on aix/ppc64 2019-03-05 15:11:20 +00:00
interface_bsd.go all: move internal/x to vendor/golang.org/x and revendor using 'go mod vendor' 2019-03-11 20:28:54 +00:00
interface_bsd_test.go net: update zoneCache on cache misses to cover appearing interfaces 2018-11-06 00:05:32 +00:00
interface_bsdvar.go all: move internal/x to vendor/golang.org/x and revendor using 'go mod vendor' 2019-03-11 20:28:54 +00:00
interface_darwin.go all: move internal/x to vendor/golang.org/x and revendor using 'go mod vendor' 2019-03-11 20:28:54 +00:00
interface_freebsd.go all: move internal/x to vendor/golang.org/x and revendor using 'go mod vendor' 2019-03-11 20:28:54 +00:00
interface_linux.go
interface_linux_test.go net: update zoneCache on cache misses to cover appearing interfaces 2018-11-06 00:05:32 +00:00
interface_plan9.go net: fix multicast and IPv6 related issues on Plan 9 2019-10-16 17:46:16 +00:00
interface_solaris.go all: move internal/x to vendor/golang.org/x and revendor using 'go mod vendor' 2019-03-11 20:28:54 +00:00
interface_stub.go all: remove the nacl port (part 1) 2019-10-09 06:14:44 +00:00
interface_test.go syscall: reenable sysctl on iOS 2019-10-23 15:12:15 +00:00
interface_unix_test.go all: fix typos 2019-09-08 17:28:20 +00:00
interface_windows.go all: fix most of the remaining windows -d=checkptr violations 2019-12-06 05:10:34 +00:00
ip.go Revert "net: halve the allocs in ParseCIDR by sharing slice backing" 2019-11-10 20:36:44 +00:00
ip_test.go Revert "net: halve the allocs in ParseCIDR by sharing slice backing" 2019-11-10 20:36:44 +00:00
iprawsock.go all: remove the nacl port (part 1) 2019-10-09 06:14:44 +00:00
iprawsock_plan9.go net: move dial and listen functions under sysDialer, sysListener 2018-05-29 23:57:04 +00:00
iprawsock_posix.go all: remove the nacl port (part 1) 2019-10-09 06:14:44 +00:00
iprawsock_test.go net: add js/wasm architecture 2018-06-04 16:01:50 +00:00
ipsock.go net: make cgo resolver work more accurately with network parameter 2018-10-25 03:14:03 +00:00
ipsock_plan9.go net: fix multicast and IPv6 related issues on Plan 9 2019-10-16 17:46:16 +00:00
ipsock_posix.go all: fix a bunch of misspellings 2019-11-15 21:04:43 +00:00
ipsock_test.go
listen_test.go all: remove the nacl port (part 1) 2019-10-09 06:14:44 +00:00
lookup.go all: remove the nacl port (part 1) 2019-10-09 06:14:44 +00:00
lookup_fake.go all: remove the nacl port (part 1) 2019-10-09 06:14:44 +00:00
lookup_plan9.go net: fix lookupHost to return DNSError on Plan 9 2019-04-25 14:25:10 +00:00
lookup_test.go all: fix invalid invocations of Fatalf in goroutines 2020-01-03 01:36:26 +00:00
lookup_unix.go all: move internal/x to vendor/golang.org/x and revendor using 'go mod vendor' 2019-03-11 20:28:54 +00:00
lookup_windows.go all: fix most of the remaining windows -d=checkptr violations 2019-12-06 05:10:34 +00:00
lookup_windows_test.go net: fix resolving local windows machine ptr 2019-08-29 09:26:02 +00:00
mac.go net: use EUI-48/EUI-64 reserved address blocks for documentation 2019-02-27 02:36:14 +00:00
mac_test.go net: use EUI-48/EUI-64 reserved address blocks for documentation 2019-02-27 02:36:14 +00:00
main_cloexec_test.go net, internal/poll, net/internal/socktest: use SOCK_{CLOEXEC,NONBLOCK} accept4/socket flags on OpenBSD 2018-02-26 16:59:38 +00:00
main_conf_test.go all: remove the nacl port (part 1) 2019-10-09 06:14:44 +00:00
main_noconf_test.go all: remove the nacl port (part 1) 2019-10-09 06:14:44 +00:00
main_plan9_test.go
main_posix_test.go net: add js/wasm architecture 2018-06-04 16:01:50 +00:00
main_test.go net: add js/wasm architecture 2018-06-04 16:01:50 +00:00
main_unix_test.go all: remove the nacl port (part 1) 2019-10-09 06:14:44 +00:00
main_windows_test.go
mockserver_test.go net: remove unixgram test sockets 2019-02-26 23:33:36 +00:00
net.go net: document *OpError.Err must not be nil 2020-01-19 02:25:54 +00:00
net_fake.go net: improve ExampleUDPConn_WriteTo docs 2018-06-26 21:30:43 +00:00
net_test.go all: remove the nacl port (part 1) 2019-10-09 06:14:44 +00:00
net_windows_test.go all: use strings.ReplaceAll and bytes.ReplaceAll where applicable 2018-09-26 22:14:25 +00:00
netgo_unix_test.go net: make cgo resolver work more accurately with network parameter 2018-10-25 03:14:03 +00:00
nss.go net: add AIX operating system 2018-10-10 17:20:53 +00:00
nss_test.go
packetconn_test.go net: add js/wasm architecture 2018-06-04 16:01:50 +00:00
parse.go net: use internal/bytealg insetad of linkname tricks 2018-08-21 22:09:23 +00:00
parse_test.go
pipe.go all: remove os.ErrTimeout 2019-08-02 17:57:18 +00:00
pipe_test.go all: move internal/x to vendor/golang.org/x and revendor using 'go mod vendor' 2019-03-11 20:28:54 +00:00
platform_test.go all: remove the nacl port (part 1) 2019-10-09 06:14:44 +00:00
port.go
port_test.go
port_unix.go all: remove the nacl port (part 1) 2019-10-09 06:14:44 +00:00
protoconn_test.go net: add js/wasm architecture 2018-06-04 16:01:50 +00:00
rawconn.go all: remove the nacl port (part 1) 2019-10-09 06:14:44 +00:00
rawconn_stub_test.go all: remove the nacl port (part 1) 2019-10-09 06:14:44 +00:00
rawconn_test.go all: remove the nacl port (part 1) 2019-10-09 06:14:44 +00:00
rawconn_unix_test.go net: add AIX operating system 2018-10-10 17:20:53 +00:00
rawconn_windows_test.go net: add ListenConfig, Dialer.Control to permit socket opts before listen/dial 2018-05-30 22:54:22 +00:00
sendfile_linux.go net: return poll.SendFile error from sendFile 2019-03-01 22:15:57 +00:00
sendfile_stub.go all: remove the nacl port (part 1) 2019-10-09 06:14:44 +00:00
sendfile_test.go all: remove the nacl port (part 1) 2019-10-09 06:14:44 +00:00
sendfile_unix_alt.go net: return poll.SendFile error from sendFile 2019-03-01 22:15:57 +00:00
sendfile_windows.go internal/poll: make SendFile work with large files on Windows 2019-09-26 06:16:42 +00:00
server_test.go net: convert TestTCPServer to use subtests 2019-10-22 17:34:15 +00:00
sock_bsd.go
sock_cloexec.go net, internal/poll, net/internal/socktest: use SOCK_{CLOEXEC,NONBLOCK} accept4/socket flags on OpenBSD 2018-02-26 16:59:38 +00:00
sock_linux.go
sock_plan9.go
sock_posix.go all: remove the nacl port (part 1) 2019-10-09 06:14:44 +00:00
sock_stub.go all: remove the nacl port (part 1) 2019-10-09 06:14:44 +00:00
sock_windows.go
sockaddr_posix.go all: remove the nacl port (part 1) 2019-10-09 06:14:44 +00:00
sockopt_aix.go net: drop confusing comment 2019-01-10 04:47:18 +00:00
sockopt_bsd.go
sockopt_linux.go
sockopt_plan9.go
sockopt_posix.go net: add AIX operating system 2018-10-10 17:20:53 +00:00
sockopt_solaris.go
sockopt_stub.go all: remove the nacl port (part 1) 2019-10-09 06:14:44 +00:00
sockopt_windows.go
sockoptip_bsdvar.go net: add AIX operating system 2018-10-10 17:20:53 +00:00
sockoptip_linux.go
sockoptip_posix.go net: add AIX operating system 2018-10-10 17:20:53 +00:00
sockoptip_stub.go all: remove the nacl port (part 1) 2019-10-09 06:14:44 +00:00
sockoptip_windows.go
splice_linux.go net: don't use splice for unix{packet,gram} connections 2018-09-24 17:25:15 +00:00
splice_stub.go net: add support for splice(2) in (*TCPConn).ReadFrom on Linux 2018-04-24 14:14:56 +00:00
splice_test.go net: pass TMPDIR to test client process 2019-04-07 18:55:23 +00:00
sys_cloexec.go all: remove the nacl port (part 1) 2019-10-09 06:14:44 +00:00
tcpsock.go all: remove the nacl port (part 1) 2019-10-09 06:14:44 +00:00
tcpsock_plan9.go net: fix multicast and IPv6 related issues on Plan 9 2019-10-16 17:46:16 +00:00
tcpsock_posix.go all: remove the nacl port (part 1) 2019-10-09 06:14:44 +00:00
tcpsock_test.go all: remove the nacl port (part 1) 2019-10-09 06:14:44 +00:00
tcpsock_unix_test.go net: add js/wasm architecture 2018-06-04 16:01:50 +00:00
tcpsockopt_darwin.go net: avoid transiting durations through floats 2019-09-17 16:25:15 +00:00
tcpsockopt_dragonfly.go net: avoid transiting durations through floats 2019-09-17 16:25:15 +00:00
tcpsockopt_openbsd.go
tcpsockopt_plan9.go
tcpsockopt_posix.go net: add AIX operating system 2018-10-10 17:20:53 +00:00
tcpsockopt_solaris.go net: avoid transiting durations through floats 2019-09-17 16:25:15 +00:00
tcpsockopt_stub.go all: remove the nacl port (part 1) 2019-10-09 06:14:44 +00:00
tcpsockopt_unix.go net: avoid transiting durations through floats 2019-09-17 16:25:15 +00:00
tcpsockopt_windows.go net: avoid transiting durations through floats 2019-09-17 16:25:15 +00:00
timeout_test.go runtime: keep adjusted timers in timerMoving status until moved 2019-11-05 18:37:06 +00:00
udpsock.go all: remove the nacl port (part 1) 2019-10-09 06:14:44 +00:00
udpsock_plan9.go net: fix multicast and IPv6 related issues on Plan 9 2019-10-16 17:46:16 +00:00
udpsock_plan9_test.go net: fix multicast and IPv6 related issues on Plan 9 2019-10-16 17:46:16 +00:00
udpsock_posix.go all: remove the nacl port (part 1) 2019-10-09 06:14:44 +00:00
udpsock_test.go all: remove the nacl port (part 1) 2019-10-09 06:14:44 +00:00
unixsock.go all: remove the nacl port (part 1) 2019-10-09 06:14:44 +00:00
unixsock_linux_test.go
unixsock_plan9.go net: move dial and listen functions under sysDialer, sysListener 2018-05-29 23:57:04 +00:00
unixsock_posix.go all: remove the nacl port (part 1) 2019-10-09 06:14:44 +00:00
unixsock_test.go all: remove the nacl port (part 1) 2019-10-09 06:14:44 +00:00
unixsock_windows_test.go net: skip TestUnixConnLocalWindows on windows/arm 2018-10-08 04:13:54 +00:00
write_unix_test.go
writev_test.go net: add js/wasm architecture 2018-06-04 16:01:50 +00:00
writev_unix.go