]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Backport trawick's mod_charset_lite patch
authorNick Kew <niq@apache.org>
Sun, 7 May 2006 20:57:32 +0000 (20:57 +0000)
committerNick Kew <niq@apache.org>
Sun, 7 May 2006 20:57:32 +0000 (20:57 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@404847 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
STATUS
modules/filters/mod_charset_lite.c

diff --git a/CHANGES b/CHANGES
index 2de4c151fd5120edada63f9c5736e77aff10f4ef..e91fea3f4548c04bf33e0fd0c63e09d25144bf55 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
                                                         -*- coding: utf-8 -*-
 Changes with Apache 2.2.3
 
+  *) mod_charset_lite: Bypass translation when the source and dest charsets
+     are the same. [Jeff Trawick]
+
 Changes with Apache 2.2.2
 
   *) mod_deflate: work correctly in an internal redirect
diff --git a/STATUS b/STATUS
index 0d77bac2314379bdcc5c41aa7637686bfab09659..90e3463e944f0036f63c105bd094d5f4af07d8e4 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -76,17 +76,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-    * Remove odd DECLINED code from mod_charset_lite filter.
-      http://svn.apache.org/viewcvs?rev=399665&view=rev
-      +1 trawick, rpluem, niq
-      niq: This is right, but the underlying behaviour (refuse to
-      work in a proxy) is bad.  There's a TODO.
-
-    * mod_charset_lite: Don't go through the motions of translating if
-      the source and dest charsets are the same.
-      http://svn.apache.org/viewcvs?rev=399668&view=rev
-      +1 trawick, rpluem, niq
-
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
 
     * Backport mod_authz_dbd (it's had some testing now)
index 61a27ed67f3b3dcb17f7c1e67cd39eba8384adbc..244db60b5e0cdb0fe8a542a3a8da58e173896306 100644 (file)
@@ -232,6 +232,8 @@ static int find_code_page(request_rec *r)
     if (!strncmp(r->filename, "gone:", 5)) return DECLINED;
     if (!strncmp(r->filename, "passthrough:", 12)) return DECLINED;
     if (!strncmp(r->filename, "forbidden:", 10)) return DECLINED;
+    /* no translation when server and network charsets are set to the same value */
+    if (!strcasecmp(dc->charset_source, dc->charset_default)) return DECLINED;
 
     mime_type = r->content_type ? r->content_type : ap_default_type(r);
 
@@ -821,9 +823,6 @@ static apr_status_t xlate_out_filter(ap_filter_t *f, apr_bucket_brigade *bb)
         }
     }
 
-    /* catch proxy requests */
-    if (f->r->proxyreq) return DECLINED;
-
     /* Opening the output translation (this used to be done in the fixup hook,
      * but that was too early: a subsequent type modification, e.g., by a
      * CGI script, would go unnoticed. Now we do it in the filter itself.)