]> granicus.if.org Git - apache/commitdiff
mod_charset_lite: Bypass translation when the source and dest charsets
authorJeff Trawick <trawick@apache.org>
Thu, 4 May 2006 11:26:12 +0000 (11:26 +0000)
committerJeff Trawick <trawick@apache.org>
Thu, 4 May 2006 11:26:12 +0000 (11:26 +0000)
are the same.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@399668 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/filters/mod_charset_lite.c

diff --git a/CHANGES b/CHANGES
index 995e42b09e4488a772297a3ccddfcc1d6667b60f..c29ff3b64293a8735c9d5cc0fe65c1e6268d641c 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,9 @@
 Changes with Apache 2.3.0
   [Remove entries to the current 2.0 and 2.2 section below, when backported]
 
+  *) mod_charset_lite: Bypass translation when the source and dest charsets
+     are the same.  [Jeff Trawick]
+
   *) mod_mem_cache: Set content type correctly when delivering data from
      cache. PR 39266. [Ruediger Pluem]
 
index 2e8a9e094215dd80fef6b7d089ce5971f0815d54..2e3cf6564245e6c5dbf40f57243307dddc8338b6 100644 (file)
@@ -233,6 +233,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);