]> granicus.if.org Git - apache/commitdiff
Merge r1407248 from trunk:
authorJim Jagielski <jim@apache.org>
Mon, 17 Dec 2012 11:46:57 +0000 (11:46 +0000)
committerJim Jagielski <jim@apache.org>
Mon, 17 Dec 2012 11:46:57 +0000 (11:46 +0000)
  *) mod_xml2enc: Fix problems with charset conversion altering the
     Content-Length. [Micha Lenk <micha lenk info>]
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
STATUS
modules/filters/mod_xml2enc.c

diff --git a/CHANGES b/CHANGES
index afb3d325f1aea0a103c7f2345bb8bb460864af60..a1be9216c0f59aa08ac91934e566ce362fdd12eb 100644 (file)
--- 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 <micha lenk info>]
+
   *) 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 b355306e1f0d409b421423f1e93ca6bdf5cd1176..7520105a4a4dee5880c76f6ab56647b57e6dfc95 100644 (file)
--- 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 <micha lenk info>]
-     trunk patch: http://svn.apache.org/viewvc?view=revision&revision=1407248
-     2.4.x patch: Trunk patch works.
-     +1: rjung, sf, jim
-
    * <If>:
      - Make <If> sections in virtual host context fill in cmd->path so that
        other directive notice that they are in a config section.
index f82f8bf50b45179f8e80a646ff191e8f9a15ddc0..a4202a288e98fe111da8faf287ee36a65d20f89e 100644 (file)
@@ -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 <meta> we just invalidated */
         ctx->flags |= ENC_INITIALISED;