From 914eedc11d3273f5347e6abad40a0379b0566971 Mon Sep 17 00:00:00 2001 From: James Bursa Date: Fri, 25 Dec 2009 19:27:22 +0000 Subject: 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 --- content/fetchers/fetch_curl.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'content') 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)) { -- cgit v1.2.3