summaryrefslogtreecommitdiff
path: root/content
diff options
context:
space:
mode:
authorJames Bursa <james@netsurf-browser.org>2005-01-22 22:42:48 +0000
committerJames Bursa <james@netsurf-browser.org>2005-01-22 22:42:48 +0000
commit1fb2e5f2c3a66ba68c0cc614cd567aa74f8b4e5a (patch)
treea168d3f02b4f919609634669b8f683fb9eaa61d1 /content
parenta429fd71de73c6b6cb6c0276db4d89a026aeec70 (diff)
downloadnetsurf-1fb2e5f2c3a66ba68c0cc614cd567aa74f8b4e5a.tar.gz
netsurf-1fb2e5f2c3a66ba68c0cc614cd567aa74f8b4e5a.tar.bz2
[project @ 2005-01-22 22:42:48 by bursa]
Fix proxy authentication bug (libcurl does not copy string options) svn path=/import/netsurf/; revision=1461
Diffstat (limited to 'content')
-rw-r--r--content/fetch.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/content/fetch.c b/content/fetch.c
index 346ac43de..e6b998a88 100644
--- a/content/fetch.c
+++ b/content/fetch.c
@@ -80,6 +80,7 @@ static CURL *fetch_blank_curl;
static struct fetch *fetch_list = 0; /**< List of active fetches. */
static char fetch_error_buffer[CURL_ERROR_SIZE]; /**< Error buffer for cURL. */
static char fetch_progress_buffer[256]; /**< Progress buffer for cURL */
+static char fetch_proxy_userpwd[100]; /**< Proxy authentication details. */
static CURLcode fetch_set_options(struct fetch *f);
static void fetch_free(struct fetch *f);
@@ -387,7 +388,6 @@ CURLcode fetch_set_options(struct fetch *f)
{
CURLcode code;
struct login *li;
- char proxy_userpwd[100];
#undef SETOPT
#define SETOPT(option, value) \
@@ -431,10 +431,12 @@ CURLcode fetch_set_options(struct fetch *f)
OPTION_HTTP_PROXY_AUTH_BASIC ?
(long) CURLAUTH_BASIC :
(long) CURLAUTH_NTLM);
- snprintf(proxy_userpwd, sizeof proxy_userpwd, "%s:%s",
+ snprintf(fetch_proxy_userpwd,
+ sizeof fetch_proxy_userpwd,
+ "%s:%s",
option_http_proxy_auth_user,
option_http_proxy_auth_pass);
- SETOPT(CURLOPT_PROXYUSERPWD, proxy_userpwd);
+ SETOPT(CURLOPT_PROXYUSERPWD, fetch_proxy_userpwd);
}
}