]> Cypherpunks repositories - gostls13.git/commitdiff
net/http: clarify proxy selection from environment
authorSean Liao <sean@liao.dev>
Tue, 6 Sep 2022 17:22:44 +0000 (18:22 +0100)
committerGopher Robot <gobot@golang.org>
Tue, 6 Sep 2022 22:13:54 +0000 (22:13 +0000)
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>

src/net/http/transport.go

index e470a6c0807988a5a997b4c190994d98feb52e07..1854daba8a71a8901866f1dcd7728e229e704706 100644 (file)
@@ -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.