Uppercase NO_PROXY takes precedence over no_proxy as in HTTP_PROXY

This commit is contained in:
Harald Müller 2018-01-30 15:10:17 +01:00 committed by Yasuhiro Matsumoto
parent 66aade104d
commit 43e817cebe

View File

@ -93,9 +93,9 @@ func connect(host, user, passwd string) (net.Conn, error) {
} }
// test for no proxy // test for no proxy
if proxy != "" { if proxy != "" {
noproxy := os.Getenv("no_proxy") noproxy := os.Getenv("NO_PROXY")
if noproxy == "" { if noproxy == "" {
noproxy = os.Getenv("NO_PROXY") noproxy = os.Getenv("no_proxy")
} }
if noproxy != "" { if noproxy != "" {
nplist := strings.Split(noproxy, ",") nplist := strings.Split(noproxy, ",")