Page MenuHomeFreeBSD

D61826.1795462172.diff
No OneTemporary

Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None

D61826.1795462172.diff

diff --git a/lib/libfetch/http.c b/lib/libfetch/http.c
--- a/lib/libfetch/http.c
+++ b/lib/libfetch/http.c
@@ -742,9 +742,6 @@
goto out;
}
- /* In any case we've seen the header and we set the valid bit */
- cs->valid = 1;
-
/* Need word first */
lex = http_header_lex(&cp, key);
if (lex != HTTPHL_WORD)
@@ -761,8 +758,12 @@
init_http_auth_challenge(cs->challenges[cs->count]);
if (strcasecmp(key, "basic") == 0) {
cs->challenges[cs->count]->scheme = HTTPAS_BASIC;
+ /* We support this scheme: mark the result valid */
+ cs->valid = 1;
} else if (strcasecmp(key, "digest") == 0) {
cs->challenges[cs->count]->scheme = HTTPAS_DIGEST;
+ /* We support this scheme: mark the result valid */
+ cs->valid = 1;
} else {
cs->challenges[cs->count]->scheme = HTTPAS_UNKNOWN;
/*
@@ -1932,8 +1933,13 @@
!server_challenges.valid) ||
(conn->err == HTTP_NEED_PROXY_AUTH &&
!proxy_challenges.valid)) {
- /* 401/7 but no www/proxy-authenticate ?? */
- DEBUGF("%03d without auth header\n", conn->err);
+ /*
+ * 401/7 but no www/proxy-authenticate, or
+ * none of the offered schemes are supported
+ */
+ DEBUGF("%03d without supported auth scheme\n",
+ conn->err);
+ http_seterr(conn->err);
goto ouch;
}
fetch_close(conn);

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 23, 7:29 PM (19 h, 55 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41893024
Default Alt Text
D61826.1795462172.diff (1 KB)

Event Timeline