summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--content/fetch.c17
-rw-r--r--render/html.c6
2 files changed, 20 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,
diff --git a/render/html.c b/render/html.c
index 30fb0dec5..7751e652e 100644
--- a/render/html.c
+++ b/render/html.c
@@ -192,6 +192,9 @@ void html_convert_css_callback(content_msg msg, struct content *css,
break;
case CONTENT_MSG_AUTH:
+ c->data.html.stylesheet_content[i] = 0;
+ c->active--;
+ c->error = 1;
break;
default:
@@ -483,6 +486,9 @@ void html_object_callback(content_msg msg, struct content *object,
break;
case CONTENT_MSG_AUTH:
+ c->data.html.object[i].content = 0;
+ c->active--;
+ c->error = 1;
break;
default: