From: Yann Ylavic Date: Fri, 20 Apr 2018 09:46:51 +0000 (+0000) Subject: http: LimitRequestBody applies to proxied requests. X-Git-Tag: 2.5.0-alpha2-ci-test-only~2673 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a3eef41ea5a4465ec320cf906e72eaa625ea5764;p=thirdparty%2Fapache%2Fhttpd.git http: LimitRequestBody applies to proxied requests. 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 --- diff --git a/CHANGES b/CHANGES index f8529a74f4d..67e5486063c 100644 --- 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] diff --git a/modules/http/http_filters.c b/modules/http/http_filters.c index 5fa768e25b5..e487692bf8d 100644 --- a/modules/http/http_filters.c +++ b/modules/http/http_filters.c @@ -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 {