From 90f04dd4618339ffba8a46f46e8ab10a4e7de5c6 Mon Sep 17 00:00:00 2001 From: Sean Liao Date: Tue, 6 Sep 2022 18:22:44 +0100 Subject: [PATCH] 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 Run-TryBot: Damien Neil Reviewed-by: Michael Knyszek TryBot-Result: Gopher Robot Auto-Submit: Damien Neil --- src/net/http/transport.go | 4 ++-- 1 file 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. -- 2.48.1