From: Daniel Earl Poirier Date: Tue, 20 Oct 2009 14:22:38 +0000 (+0000) Subject: * Return APR_EOF if request body is shorter than the length announced by the X-Git-Tag: 2.2.15~184 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6091c0c2af5f0f4340fc775f4bd4252407a9e64a;p=thirdparty%2Fapache%2Fhttpd.git * Return APR_EOF if request body is shorter than the length announced by the client. PR: 33098 Submitted by: Stefan Fritsch git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@827514 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index af7c2c8e1bb..314078c6140 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,9 @@ - -*- coding: utf-8 -*- + -*- coding: utf-8 -*- Changes with Apache 2.2.15 + *) core: Return APR_EOF if request body is shorter than the length announced + by the client. PR 33098 [ Stefan Fritsch ] + *) mod_rewrite: Add scgi scheme detection. [André Malo] *) mod_mime: Detect invalid use of MultiviewsMatch inside Location and diff --git a/modules/http/http_filters.c b/modules/http/http_filters.c index f7f86df479b..81295b242a3 100644 --- a/modules/http/http_filters.c +++ b/modules/http/http_filters.c @@ -524,6 +524,11 @@ apr_status_t ap_http_filter(ap_filter_t *f, apr_bucket_brigade *b, if (ctx->state != BODY_NONE) { ctx->remaining -= totalread; + if (ctx->remaining > 0) { + e = APR_BRIGADE_LAST(b); + if (APR_BUCKET_IS_EOS(e)) + return APR_EOF; + } } /* If we have no more bytes remaining on a C-L request,