diff options
| author | Daniel Martí <mvdan@mvdan.cc> | 2017-09-25 17:21:39 +0100 |
|---|---|---|
| committer | Daniel Martí <mvdan@mvdan.cc> | 2017-09-26 22:45:04 +0000 |
| commit | e61c5e2f2044c7bc606ebdfbd0187598b90c50e5 (patch) | |
| tree | 33e5b428396bafd682f2eb30de4feac9a721634a /src/net/http/http.go | |
| parent | 0744c21b98e916470c97ff5816630398cf3213c8 (diff) | |
| download | go-e61c5e2f2044c7bc606ebdfbd0187598b90c50e5.tar.xz | |
net/http: error if Transport.Proxy returns https
Transport.Proxy is documented as only supporting the http and socks5
schemes. If one tries to use it for https URLs, they end up with a
cryptic error like:
http: TLS handshake error from [...]: tls: oversized record received with length 20037
This is because Transport simply skips TLS if Proxy is non-nil, since it
knows it doesn't support Proxy with https.
However, that error is very confusing and it can take a while to figure
out what's going on. Instead, error if Proxy is used and it returns an
unsupported scheme.
Updates #19493.
Change-Id: Ia036357011752f45bb9b8282a4ab5e31bc8d1a69
Reviewed-on: https://go-review.googlesource.com/66010
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Tom Bergan <tombergan@google.com>
Diffstat (limited to 'src/net/http/http.go')
0 files changed, 0 insertions, 0 deletions
