From 8dca57cccd248de04356f3516d35723f072d9e1d Mon Sep 17 00:00:00 2001 From: Ryan Bloom Date: Thu, 9 Nov 2000 03:00:00 +0000 Subject: [PATCH] The content-length filter needs to compute the length even if the content-length has already been set. If we don't, then we won't know if the content-length has changed because some other filter changed the length of the actual data. We also ALWAYS want to calculate the content length if we get the whole brigade in the first call to this function. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86879 13f79535-47bb-0310-9956-ffa450edef68 --- modules/http/http_protocol.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/http/http_protocol.c b/modules/http/http_protocol.c index b440b4e69f3..d002027ca31 100644 --- a/modules/http/http_protocol.c +++ b/modules/http/http_protocol.c @@ -2237,16 +2237,16 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_content_length_filter(ap_filter_t *f, * . body already chunked * Much of this should correspond to checks in ap_set_keepalive(). */ - if (r->assbackwards + if ((r->assbackwards || r->status == HTTP_NOT_MODIFIED || r->status == HTTP_NO_CONTENT || r->header_only - || apr_table_get(r->headers_out, "Content-Length") || r->proto_num == HTTP_VERSION(1,1) || ap_find_last_token(f->r->pool, apr_table_get(r->headers_out, "Transfer-Encoding"), - "chunked")) { + "chunked")) + && (!AP_BUCKET_IS_EOS(AP_BRIGADE_LAST(b)))) { ctx->hold_data = 0; } else { -- 2.47.2