You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by jo...@apache.org on 2026/07/06 12:52:42 UTC
svn commit: r1935954 - httpd/httpd/trunk/modules/aaa
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)) {