diff --git a/mod_reqin_log.spec b/mod_reqin_log.spec index fea4fd5..76f30f3 100644 --- a/mod_reqin_log.spec +++ b/mod_reqin_log.spec @@ -1,4 +1,4 @@ -%global spec_version 1.0.17 +%global spec_version 1.0.18 Name: mod_reqin_log Version: %{spec_version} @@ -37,6 +37,10 @@ install -m 644 %{_pkgroot}/%{_sysconfdir}/httpd/conf.d/mod_reqin_log.conf %{buil %doc %{_docdir}/%{name} %changelog +* Thu Mar 05 2026 Developer - 1.0.18 +- FIX: JsonSockLogMaxHeaders now counts configured headers (by position in list) + regardless of their presence in the request, matching the documented behavior + * Thu Mar 05 2026 Developer - 1.0.17 - CONFIG: Extend default JsonSockLogHeaders list (User-Agent, Referer, X-Forwarded-For, Sec-CH-UA*, Sec-Fetch-*, Accept, Accept-Language, Accept-Encoding) diff --git a/src/mod_reqin_log.c b/src/mod_reqin_log.c index 2cbc2f0..95b251c 100644 --- a/src/mod_reqin_log.c +++ b/src/mod_reqin_log.c @@ -837,6 +837,9 @@ static void log_request(request_rec *r, reqin_log_config_t *cfg, reqin_log_child continue; } + /* Count against the limit regardless of header presence in the request */ + header_count++; + header_value = get_header(r, header_name); if (header_value != NULL) { @@ -864,8 +867,6 @@ static void log_request(request_rec *r, reqin_log_config_t *cfg, reqin_log_child truncated = apr_pstrmemdup(pool, header_value, val_len); append_json_string(&buf, truncated); dynbuf_append(&buf, "\"", 1); - - header_count++; } } }