summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorRuediger Pluem <rpluem@apache.org>2023-01-23 09:59:14 +0100
committerRuediger Pluem <rpluem@apache.org>2023-01-23 09:59:14 +0100
commit296a99c3102e4dd91153a8fb732275b804f001fc (patch)
tree3c3fd8852afeec1b582810c52011395d8e58a3bb /modules
parent* Steal an error number [skip ci] (diff)
downloadapache2-296a99c3102e4dd91153a8fb732275b804f001fc.tar.xz
apache2-296a99c3102e4dd91153a8fb732275b804f001fc.zip
* Report an error if the AJP backend sends an invalid number of headers
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1906940 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r--modules/proxy/ajp_header.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/modules/proxy/ajp_header.c b/modules/proxy/ajp_header.c
index b4dc47ccf5..a09a2e43a3 100644
--- a/modules/proxy/ajp_header.c
+++ b/modules/proxy/ajp_header.c
@@ -584,8 +584,15 @@ static apr_status_t ajp_unmarshal_response(ajp_msg_t *msg,
r->headers_out = save_table;
}
else {
- r->headers_out = NULL;
+ /*
+ * Reset headers, but not to NULL because things below the chain expect
+ * this to be non NULL e.g. the ap_content_length_filter.
+ */
+ r->headers_out = apr_table_make(r->pool, 1);
num_headers = 0;
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(10405)
+ "ajp_unmarshal_response: Bad number of headers");
+ return rc;
}
ap_log_rerror(APLOG_MARK, APLOG_TRACE4, 0, r,