From 9fb4cf8a901c846b5d09f2f4e1da3d57f9891a5a Mon Sep 17 00:00:00 2001 From: Max Chadwick Date: Wed, 22 Feb 2017 22:49:32 -0500 Subject: [PATCH] Prevent duplicate request header size gathering I'm not sure why but this was happening twice. mod_log_forensic.c seemed to make use of this hook for inspecting the request, so I thought it would be safe... --- mod_log_header_size.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mod_log_header_size.c b/mod_log_header_size.c index ec01330..8117567 100644 --- a/mod_log_header_size.c +++ b/mod_log_header_size.c @@ -71,7 +71,9 @@ static int log_header_size_pre_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_ static int log_header_size_post_read_request(request_rec *r) { log_header_size_config_t *cf = ap_get_module_config(r->connection->conn_config, &log_header_size_module); - apr_table_do(gather_header_size, &cf->bytes_in_header, r->headers_in, NULL); + if (cf->bytes_in_header == 0) { + apr_table_do(gather_header_size, &cf->bytes_in_header, r->headers_in, NULL); + } return OK; }