summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam A. Rowe Jr <wrowe@apache.org>2016-11-04 20:50:45 +0000
committerWilliam A. Rowe Jr <wrowe@apache.org>2016-11-04 20:50:45 +0000
commit395626e39bc115c3b1feb5e737d424768a7ba227 (patch)
tree895c51dea0e1cff930a65203e7566f8aa867c06f
parent9c8a80882f996537086856e55870315cc0efab72 (diff)
downloadhttpd-395626e39bc115c3b1feb5e737d424768a7ba227.tar.gz
ap_rgetline_core() now pulls from r->proto_input_filters
for better input filtering behavior during chunked trailer processing by ap_http_filter(). Backports: r1446421 Submitted by: joes git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x-merge-http-strict@1768093 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--CHANGES2
-rw-r--r--server/protocol.c8
2 files changed, 8 insertions, 2 deletions
diff --git a/CHANGES b/CHANGES
index f9859d8663..0151435686 100644
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,8 @@
Changes with Apache 2.4.24
+ *) core: ap_rgetline_core now pulls from r->proto_input_filters.
+
*) core, http: Extend HttpProtocol with an option to enforce stricter HTTP
conformance or to only log the found problems. [Stefan Fritsch]
diff --git a/server/protocol.c b/server/protocol.c
index a1a3845a7e..66ab924aef 100644
--- a/server/protocol.c
+++ b/server/protocol.c
@@ -191,6 +191,10 @@ AP_DECLARE(apr_time_t) ap_rationalize_mtime(request_rec *r, apr_time_t mtime)
/* Get a line of protocol input, including any continuation lines
* caused by MIME folding (or broken clients) if fold != 0, and place it
* in the buffer s, of size n bytes, without the ending newline.
+ *
+ * Pulls from r->proto_input_filters instead of r->input_filters for
+ * stricter protocol adherence and better input filter behavior during
+ * chunked trailer processing (for http).
*
* If s is NULL, ap_rgetline_core will allocate necessary memory from r->pool.
*
@@ -229,7 +233,7 @@ AP_DECLARE(apr_status_t) ap_rgetline_core(char **s, apr_size_t n,
for (;;) {
apr_brigade_cleanup(bb);
- rv = ap_get_brigade(r->input_filters, bb, AP_MODE_GETLINE,
+ rv = ap_get_brigade(r->proto_input_filters, bb, AP_MODE_GETLINE,
APR_BLOCK_READ, 0);
if (rv != APR_SUCCESS) {
return rv;
@@ -343,7 +347,7 @@ AP_DECLARE(apr_status_t) ap_rgetline_core(char **s, apr_size_t n,
apr_brigade_cleanup(bb);
/* We only care about the first byte. */
- rv = ap_get_brigade(r->input_filters, bb, AP_MODE_SPECULATIVE,
+ rv = ap_get_brigade(r->proto_input_filters, bb, AP_MODE_SPECULATIVE,
APR_BLOCK_READ, 1);
if (rv != APR_SUCCESS) {
return rv;