]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
http: LimitRequestBody applies to proxied requests.
authorYann Ylavic <ylavic@apache.org>
Fri, 20 Apr 2018 09:46:51 +0000 (09:46 +0000)
committerYann Ylavic <ylavic@apache.org>
Fri, 20 Apr 2018 09:46:51 +0000 (09:46 +0000)
If f->r->proxyreq is PROXYREQ_PROXY or PROXYREQ_REVERSE in ap_http_filter(),
we are still handling the request, not the response where LimitRequestBody
does not apply.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1829642 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/http/http_filters.c

diff --git a/CHANGES b/CHANGES
index f8529a74f4d3e362641a7b8559738537b383cb4f..67e5486063c2508bb0b44d5fc1c954acbbe2db81 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,8 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.5.1
 
+  *) http: LimitRequestBody applies to proxied requests.  [Yann Ylavic]
+
   *) mod_proxy_http: Fix response header thrown away after the previous one
      was considered too large and truncated. PR 62196. [Yann Ylavic]
 
index 5fa768e25b5a439b43ce4e7fa3f96ff15f96dba4..e487692bf8d8c339c5089420e28820976ba3a63c 100644 (file)
@@ -317,12 +317,11 @@ apr_status_t ap_http_filter(ap_filter_t *f, apr_bucket_brigade *b,
         f->ctx = ctx = apr_pcalloc(f->r->pool, sizeof(*ctx));
         ctx->state = BODY_NONE;
 
-        /* LimitRequestBody does not apply to proxied responses.
+        /* LimitRequestBody does not apply to proxied responses, which have
+         * their own ResponseFieldSize parameter.
          * Consider implementing this check in its own filter.
-         * Would adding a directive to limit the size of proxied
-         * responses be useful?
          */
-        if (!f->r->proxyreq) {
+        if (f->r->proxyreq != PROXYREQ_RESPONSE) {
             ctx->limit = ap_get_limit_req_body(f->r);
         }
         else {