diff options
author | James Bursa <james@netsurf-browser.org> | 2009-12-25 19:27:22 +0000 |
---|---|---|
committer | James Bursa <james@netsurf-browser.org> | 2009-12-25 19:27:22 +0000 |
commit | 914eedc11d3273f5347e6abad40a0379b0566971 (patch) | |
tree | 12283442df9a446b3876a2673c345cc95f09f889 | |
parent | f23a285103aaa012bf60a801ea9c483000301b8f (diff) | |
download | netsurf-914eedc11d3273f5347e6abad40a0379b0566971.tar.gz netsurf-914eedc11d3273f5347e6abad40a0379b0566971.tar.bz2 |
Don't set proxy option for file: URLs to workaround some versions of libcurl attempting to use it (fixed in latest libcurl). Also unset curl proxy option if it's disabled so the previous xfer's setting isn't retained.
svn path=/trunk/netsurf/; revision=9759
-rw-r--r-- | content/fetchers/fetch_curl.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/content/fetchers/fetch_curl.c b/content/fetchers/fetch_curl.c index 67b74ef99..e04811829 100644 --- a/content/fetchers/fetch_curl.c +++ b/content/fetchers/fetch_curl.c @@ -567,7 +567,8 @@ fetch_curl_set_options(struct curl_fetch_info *f) SETOPT(CURLOPT_USERPWD, NULL); } - if (option_http_proxy && option_http_proxy_host) { + if (option_http_proxy && option_http_proxy_host && + strncmp(f->url, "file:", 5) != 0) { SETOPT(CURLOPT_PROXY, option_http_proxy_host); SETOPT(CURLOPT_PROXYPORT, (long) option_http_proxy_port); if (option_http_proxy_auth != OPTION_HTTP_PROXY_AUTH_NONE) { @@ -583,6 +584,8 @@ fetch_curl_set_options(struct curl_fetch_info *f) option_http_proxy_auth_pass); SETOPT(CURLOPT_PROXYUSERPWD, fetch_proxy_userpwd); } + } else { + SETOPT(CURLOPT_PROXY, NULL); } if (urldb_get_cert_permissions(f->url)) { |