mirror of
https://github.com/FluuxIO/go-xmpp.git
synced 2026-05-23 12:23:46 -07:00
Uppercase NO_PROXY takes precedence over no_proxy as in HTTP_PROXY
This commit is contained in:
committed by
Yasuhiro Matsumoto
parent
66aade104d
commit
43e817cebe
@@ -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, ",")
|
||||||
|
|||||||
Reference in New Issue
Block a user