url: --noproxy option overrides NO_PROXY environment variable

Under condition using http_proxy env var, noproxy list was the
combination of --noproxy option and NO_PROXY env var previously. Since
this commit, --noproxy option overrides NO_PROXY environment variable
even if use http_proxy env var.

Closes #1140
This commit is contained in:
ERAMOTO Masaya 2016-12-19 16:27:24 +09:00 committed by Daniel Stenberg
parent efdbfde7ca
commit 2ac1942c72
10 changed files with 335 additions and 2 deletions

View file

@ -6252,8 +6252,7 @@ static CURLcode create_conn(struct Curl_easy *data,
else if(!proxy && !socksproxy)
#ifndef CURL_DISABLE_HTTP
/* if the host is not in the noproxy list, detect proxy. */
if(!check_noproxy(conn->host.name, no_proxy))
proxy = detect_proxy(conn);
proxy = detect_proxy(conn);
#else /* !CURL_DISABLE_HTTP */
proxy = NULL;
#endif /* CURL_DISABLE_HTTP */