summaryrefslogtreecommitdiff
path: root/content/fetch.c
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2003-10-25 22:51:45 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2003-10-25 22:51:45 +0000
commitab8edd9da4ec6766dfb07acd25bea5c3f503c1e3 (patch)
tree2161edd587c0c03d1cd883aa4f99f91ba875a6aa /content/fetch.c
parentc91e9b3458245a4a7b63751016a5b94749746ef0 (diff)
downloadnetsurf-ab8edd9da4ec6766dfb07acd25bea5c3f503c1e3.tar.gz
netsurf-ab8edd9da4ec6766dfb07acd25bea5c3f503c1e3.tar.bz2
[project @ 2003-10-25 22:51:45 by jmb]
Fix bug relating to http://www.mw-software.com/software/artworks2/aw2support.html svn path=/import/netsurf/; revision=388
Diffstat (limited to 'content/fetch.c')
-rw-r--r--content/fetch.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/content/fetch.c b/content/fetch.c
index a6ff946f2..85e6f00f2 100644
--- a/content/fetch.c
+++ b/content/fetch.c
@@ -266,10 +266,10 @@ struct fetch * fetch_start(char *url, char *referer,
}
/* HTTP auth */
- code = curl_easy_setopt(fetch->curl_handle, CURLOPT_HTTPAUTH, (long)CURLAUTH_ANY);
- assert(code == CURLE_OK);
-
if ((li=login_list_get(url)) != NULL) {
+ code = curl_easy_setopt(fetch->curl_handle, CURLOPT_HTTPAUTH, (long)CURLAUTH_ANY);
+ assert(code == CURLE_OK);
+
code = curl_easy_setopt(fetch->curl_handle, CURLOPT_USERPWD, li->logindetails);
assert(code == CURLE_OK);
@@ -301,6 +301,7 @@ struct fetch * fetch_start(char *url, char *referer,
void fetch_abort(struct fetch *f)
{
CURLMcode codem;
+ struct login *li;
assert(f != 0);
LOG(("fetch %p, url '%s'", f, f->url));
@@ -356,6 +357,16 @@ void fetch_abort(struct fetch *f)
assert(code == CURLE_OK);
}
+ /* HTTP auth */
+ if ((li=login_list_get(f->url)) != NULL) {
+ code = curl_easy_setopt(fetch->curl_handle, CURLOPT_HTTPAUTH, (long)CURLAUTH_ANY);
+ assert(code == CURLE_OK);
+
+ code = curl_easy_setopt(fetch->curl_handle, CURLOPT_USERPWD, li->logindetails);
+
+ assert(code == CURLE_OK);
+ }
+
/* POST */
if (fetch->post_urlenc) {
code = curl_easy_setopt(fetch->curl_handle,