aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSean Liao <sean@liao.dev>2022-09-06 18:22:44 +0100
committerGopher Robot <gobot@golang.org>2022-09-06 22:13:54 +0000
commit90f04dd4618339ffba8a46f46e8ab10a4e7de5c6 (patch)
treee740094f469a71c9efb1e254c551695e3d520335 /src
parent86f8b8d3f20129dce7a220d4ce32d13e766ba86a (diff)
downloadgo-90f04dd4618339ffba8a46f46e8ab10a4e7de5c6.tar.xz
net/http: clarify proxy selection from environment
For #40909 Fixes #54890 Change-Id: I00218bc1606eedb6194a3a7b81fd4d3f75325280 Reviewed-on: https://go-review.googlesource.com/c/go/+/428775 Reviewed-by: Damien Neil <dneil@google.com> Run-TryBot: Damien Neil <dneil@google.com> Reviewed-by: Michael Knyszek <mknyszek@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Auto-Submit: Damien Neil <dneil@google.com>
Diffstat (limited to 'src')
-rw-r--r--src/net/http/transport.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/net/http/transport.go b/src/net/http/transport.go
index e470a6c080..1854daba8a 100644
--- a/src/net/http/transport.go
+++ b/src/net/http/transport.go
@@ -422,8 +422,8 @@ func (t *Transport) onceSetNextProtoDefaults() {
// ProxyFromEnvironment returns the URL of the proxy to use for a
// given request, as indicated by the environment variables
// HTTP_PROXY, HTTPS_PROXY and NO_PROXY (or the lowercase versions
-// thereof). HTTPS_PROXY takes precedence over HTTP_PROXY for https
-// requests.
+// thereof). Requests use the proxy from the environment variable
+// matching their scheme, unless excluded by NO_PROXY.
//
// The environment values may be either a complete URL or a
// "host[:port]", in which case the "http" scheme is assumed.