Skip to content

Commit 65d2d85

Browse files
committed
* modules/aaa/mod_auth_digest.c (add_auth_info): Don't add
(Proxy-)Authentication-Info headers to 401/407 responses.
1 parent 4eddd01 commit 65d2d85

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

modules/aaa/mod_auth_digest.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1650,8 +1650,14 @@ static int add_auth_info(request_rec *r)
16501650
return OK;
16511651
}
16521652

1653-
/* setup nextnonce
1654-
*/
1653+
/* Don't add Authentication-Info for 401/407 responses. */
1654+
if (apr_table_get(r->err_headers_out,
1655+
(r->proxyreq == PROXYREQ_PROXY)
1656+
? "Proxy-Authenticate" : "WWW-Authenticate")) {
1657+
return OK;
1658+
}
1659+
1660+
/* Set up nextnonce for one-time-nonces and expiring-nonce cases. */
16551661
if (conf->nonce_lifetime > 0) {
16561662
/* send nextnonce if current nonce will expire in less than 30 secs */
16571663
if ((r->request_time - resp->nonce_time) > (conf->nonce_lifetime-NEXTNONCE_DELTA)) {

0 commit comments

Comments
 (0)