- Alexander Beedie provided the patch for a noproxy problem: If I have set

CURLOPT_NOPROXY to "*", or to a host that should not use a proxy, I actually
  could still end up using a proxy if a proxy environment variable was set.
This commit is contained in:
Daniel Stenberg
2009-08-01 11:02:10 +00:00
parent 8b0fc9819f
commit 2642638fca
4 changed files with 14 additions and 7 deletions

View File

@@ -4419,14 +4419,17 @@ static CURLcode create_conn(struct SessionHandle *data,
}
}
if(!proxy)
proxy = detect_proxy(conn);
else if(data->set.str[STRING_NOPROXY]) {
if(check_noproxy(conn->host.name, data->set.str[STRING_NOPROXY])) {
if(data->set.str[STRING_NOPROXY] &&
check_noproxy(conn->host.name, data->set.str[STRING_NOPROXY])) {
if(proxy) {
free(proxy); /* proxy is in exception list */
proxy = NULL;
}
}
else if(!proxy)
proxy = detect_proxy(conn);
if(proxy && !*proxy) {
free(proxy); /* Don't bother with an empty proxy string */
proxy = NULL;