From 95a6384d9f3308c756b6c5d195fb7bcbb748c4f8 Mon Sep 17 00:00:00 2001 From: Jim Jagielski Date: Mon, 17 Dec 2012 11:46:57 +0000 Subject: [PATCH] Merge r1407248 from trunk: *) mod_xml2enc: Fix problems with charset conversion altering the Content-Length. [Micha Lenk ] Reviewed/backported by: jim git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1422871 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES | 3 +++ STATUS | 6 ------ modules/filters/mod_xml2enc.c | 3 +++ 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CHANGES b/CHANGES index afb3d325f1..a1be9216c0 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,9 @@ Changes with Apache 2.4.4 + *) mod_xml2enc: Fix problems with charset conversion altering the + Content-Length. [Micha Lenk ] + *) ap_expr: Add req_novary function that allows HTTP header lookups without adding the name to the Vary header. [Stefan Fritsch] diff --git a/STATUS b/STATUS index b355306e1f..7520105a4a 100644 --- a/STATUS +++ b/STATUS @@ -91,12 +91,6 @@ RELEASE SHOWSTOPPERS: PATCHES ACCEPTED TO BACKPORT FROM TRUNK: [ start all new proposals below, under PATCHES PROPOSED. ] - * mod_xml2enc: Fix problems with charset conversion altering the - Content-Length. [Micha Lenk ] - trunk patch: http://svn.apache.org/viewvc?view=revision&revision=1407248 - 2.4.x patch: Trunk patch works. - +1: rjung, sf, jim - * : - Make sections in virtual host context fill in cmd->path so that other directive notice that they are in a config section. 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