From 9e0df917dd600c0083d07edaaf27da02a174ec12 Mon Sep 17 00:00:00 2001 From: Jim Jagielski Date: Thu, 8 Nov 2012 20:00:38 +0000 Subject: [PATCH] *) mod_xml2enc: Fix problems with charset conversion altering the Content-Length. [Micha Lenk ] git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1407248 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES | 3 +++ modules/filters/mod_xml2enc.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/CHANGES b/CHANGES index ddf11732ea..6ab23424db 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,9 @@ -*- coding: utf-8 -*- Changes with Apache 2.5.0 + *) mod_xml2enc: Fix problems with charset conversion altering the + Content-Length. [Micha Lenk ] + *) core: New directive HttpProtocol which allows to disable HTTP/0.9 support. [Stefan Fritsch] diff --git a/modules/filters/mod_xml2enc.c b/modules/filters/mod_xml2enc.c index f82f8bf50b..a4202a288e 100644 --- a/modules/filters/mod_xml2enc.c +++ b/modules/filters/mod_xml2enc.c @@ -370,6 +370,9 @@ static apr_status_t xml2enc_ffunc(ap_filter_t* f, apr_bucket_brigade* bb) /* nah, we only have one action here - call it inline */ fix_skipto(f->r, ctx); + /* we might change the Content-Length, so let's force its re-calculation */ + apr_table_unset(f->r->headers_out, "Content-Length"); + /* consume the data we just sniffed */ /* we need to omit any we just invalidated */ ctx->flags |= ENC_INITIALISED; -- 2.40.0