svn commit: r1935954 - httpd/httpd/trunk/modules/aaa
[email protected] Mon, 06 Jul 2026 12:52:42 -0000
| Newsgroups | gmane.comp.apache.cvs |
|---|---|
| Message-ID | <178334236218.454119.9150897223548882479@svn03-he-fi> |
Author: jorton
Date: Mon Jul 6 12:52:41 2026
New Revision: 1935954
Log:
* modules/aaa/mod_auth_digest.c (add_auth_info): Don't add
(Proxy-)Authentication-Info headers to 401/407 responses.
GitHub: PR #661
Modified:
httpd/httpd/trunk/modules/aaa/mod_auth_digest.c
Modified: httpd/httpd/trunk/modules/aaa/mod_auth_digest.c
==============================================================================
--- httpd/httpd/trunk/modules/aaa/mod_auth_digest.c Mon Jul 6 12:52:32 2026 (r1935953)
+++ httpd/httpd/trunk/modules/aaa/mod_auth_digest.c Mon Jul 6 12:52:41 2026 (r1935954)
@@ -1650,8 +1650,14 @@ static int add_auth_info(request_rec *r)
return OK;
}
- /* setup nextnonce
- */
+ /* Don't add Authentication-Info for 401/407 responses. */
+ if (apr_table_get(r->err_headers_out,
+ (r->proxyreq == PROXYREQ_PROXY)
+ ? "Proxy-Authenticate" : "WWW-Authenticate")) {
+ return OK;
+ }
+
+ /* Set up nextnonce for one-time-nonces and expiring-nonce cases. */
if (conf->nonce_lifetime > 0) {
/* send nextnonce if current nonce will expire in less than 30 secs */
if ((r->request_time - resp->nonce_time) > (conf->nonce_lifetime-NEXTNONCE_DELTA)) {