summaryrefslogtreecommitdiff
path: root/content
diff options
context:
space:
mode:
Diffstat (limited to 'content')
-rw-r--r--content/content.h2
-rw-r--r--content/fetch.h2
-rw-r--r--content/fetchcache.c2
-rw-r--r--content/fetchers/fetch_curl.c9
4 files changed, 1 insertions, 14 deletions
diff --git a/content/content.h b/content/content.h
index 42cca1f74..298e669ca 100644
--- a/content/content.h
+++ b/content/content.h
@@ -97,9 +97,7 @@ typedef enum {
CONTENT_MSG_NEWPTR, /**< structure has been replaced */
CONTENT_MSG_REFRESH, /**< wants refresh */
CONTENT_MSG_LAUNCH, /**< needs url launching in external program */
-#ifdef WITH_AUTH
CONTENT_MSG_AUTH, /**< authentication required */
-#endif
CONTENT_MSG_SSL /**< SSL cert verify failed */
} content_msg;
diff --git a/content/fetch.h b/content/fetch.h
index eaae1165b..42b6323c5 100644
--- a/content/fetch.h
+++ b/content/fetch.h
@@ -36,9 +36,7 @@ typedef enum {
FETCH_ERROR,
FETCH_REDIRECT,
FETCH_NOTMODIFIED,
-#ifdef WITH_AUTH
FETCH_AUTH,
-#endif
FETCH_CERT_ERR,
} fetch_msg;
diff --git a/content/fetchcache.c b/content/fetchcache.c
index ddd46b4d4..390c092b6 100644
--- a/content/fetchcache.c
+++ b/content/fetchcache.c
@@ -501,7 +501,6 @@ void fetchcache_callback(fetch_msg msg, void *p, const void *data,
fetchcache_notmodified(c, data);
break;
-#ifdef WITH_AUTH
case FETCH_AUTH:
/* data -> string containing the Realm */
LOG(("FETCH_AUTH, '%s'", (const char *)data));
@@ -512,7 +511,6 @@ void fetchcache_callback(fetch_msg msg, void *p, const void *data,
* destroyed in content_clean() */
c->status = CONTENT_STATUS_ERROR;
break;
-#endif
case FETCH_CERT_ERR:
c->fetch = 0;
diff --git a/content/fetchers/fetch_curl.c b/content/fetchers/fetch_curl.c
index 0bd1161e6..2ce316aaa 100644
--- a/content/fetchers/fetch_curl.c
+++ b/content/fetchers/fetch_curl.c
@@ -561,16 +561,13 @@ fetch_curl_set_options(struct curl_fetch_info *f)
SETOPT(CURLOPT_COOKIE, NULL);
}
-#ifdef WITH_AUTH
if ((auth = urldb_get_auth_details(f->url)) != NULL) {
SETOPT(CURLOPT_HTTPAUTH, CURLAUTH_ANY);
SETOPT(CURLOPT_USERPWD, auth);
} else {
-#endif
SETOPT(CURLOPT_USERPWD, NULL);
-#ifdef WITH_AUTH
}
-#endif
+
if (option_http_proxy && option_http_proxy_host) {
SETOPT(CURLOPT_PROXY, option_http_proxy_host);
SETOPT(CURLOPT_PROXYPORT, (long) option_http_proxy_port);
@@ -1036,7 +1033,6 @@ size_t fetch_curl_header(char *data, size_t size, size_t nmemb,
SKIP_ST(15);
if (i < (int)size && '0' <= data[i] && data[i] <= '9')
f->content_length = atol(data + i);
-#ifdef WITH_AUTH
} else if (17 < size && strncasecmp(data, "WWW-Authenticate:", 17) == 0) {
/* extract the first Realm from WWW-Authenticate header */
free(f->realm);
@@ -1065,7 +1061,6 @@ size_t fetch_curl_header(char *data, size_t size, size_t nmemb,
f->realm[i] == '\n'); --i)
f->realm[i] = '\0';
}
-#endif
} else if (11 < size && strncasecmp(data, "Set-Cookie:", 11) == 0) {
/* extract Set-Cookie header */
SKIP_ST(11);
@@ -1118,12 +1113,10 @@ bool fetch_curl_process_headers(struct curl_fetch_info *f)
}
/* handle HTTP 401 (Authentication errors) */
-#ifdef WITH_AUTH
if (http_code == 401) {
fetch_send_callback(FETCH_AUTH, f->fetch_handle, f->realm,0);
return true;
}
-#endif
/* handle HTTP errors (non 2xx response codes) */
if (f->only_2xx && strncmp(f->url, "http", 4) == 0 &&