]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Backport r829657 from trunk:
authorEric Covener <covener@apache.org>
Wed, 18 Nov 2009 16:18:06 +0000 (16:18 +0000)
committerEric Covener <covener@apache.org>
Wed, 18 Nov 2009 16:18:06 +0000 (16:18 +0000)
  mod_charsert_lite: Start honoring the 'NoImplicitAdd' CharsetOption.
  Unsettable since 2.2.9, before that a no-op.

Reviewed By: covener, trawick, poirier

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@881824 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
STATUS
modules/filters/mod_charset_lite.c

diff --git a/CHANGES b/CHANGES
index 969df4a42c80cca525851f73d462333551ed292e..e34a4070295a135fa05fd792dbd97f309a76211d 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -8,6 +8,9 @@ Changes with Apache 2.2.15
      control is still vulnerable, unless using OpenSSL >= 0.9.8l.  
      [Joe Orton, Ruediger Pluem]
 
+  *) mod_charset_lite: Honor 'CharsetOptions NoImplicitAdd'.
+     [Eric Covener]
+
   *) mod_rewrite: Make sure that a hostname:port isn't fully qualified if
      the request is a CONNECT request. PR 47928
      [Bill Zajac <billz consultla.com>]
diff --git a/STATUS b/STATUS
index 91d362b347155ea0e5e2c29ffe75b0f459218618..524e449e1452ac4cf135e59116f146b7a8dd5ff6 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -87,17 +87,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-  * mod_charset_lite: Start honoring the 'NoImplicitAdd' CharsetOption, and document
-    behavior correctly.
-
-    Trunk Patch:  http://svn.apache.org/viewvc?rev=829657&view=rev
-                  http://svn.apache.org/viewvc?rev=829664&view=rev
-                  http://svn.apache.org/viewvc?rev=829667&view=rev
-
-    2.2.x Patch:  http://people.apache.org/~covener/2.2.x-xlate_lite-noimplicitadd.diff (no code conflicts)
-    +1: covener, trawick (without unrelated generated html), poirier
-        (without unrelated generated html)
-
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
   [ New proposals should be added at the end of the list ]
 
index 2d54ff6fd8b58c029686e503612073e968942e65..76bbe55135118fd049e74a2b58da9e5f207e39fe 100644 (file)
@@ -181,7 +181,7 @@ static const char *add_charset_options(cmd_parms *cmd, void *in_dc,
     else if (!strcasecmp(flag, "NoImplicitAdd")) {
         dc->implicit_add = IA_NOIMPADD;
     }
-    if (!strcasecmp(flag, "TranslateAllMimeTypes")) {
+    else if (!strcasecmp(flag, "TranslateAllMimeTypes")) {
         dc->force_xlate = FX_FORCE;
     }
     else if (!strcasecmp(flag, "NoTranslateAllMimeTypes")) {
@@ -337,6 +337,15 @@ static void xlate_insert_filter(request_rec *r)
     charset_dir_t *dc = ap_get_module_config(r->per_dir_config,
                                              &charset_lite_module);
 
+    if (dc && (dc->implicit_add == IA_NOIMPADD)) { 
+        if (dc->debug >= DBGLVL_GORY) {
+            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+                          "xlate output filter not added implicitly because "
+                          "CharsetOptions included 'NoImplicitAdd'");
+        }
+        return;
+    }
+
     if (reqinfo) {
         if (reqinfo->output_ctx && !configured_on_output(r, XLATEOUT_FILTER_NAME)) {
             ap_add_output_filter(XLATEOUT_FILTER_NAME, reqinfo->output_ctx, r,