From: Jeff Trawick Date: Thu, 4 May 2006 11:26:12 +0000 (+0000) Subject: mod_charset_lite: Bypass translation when the source and dest charsets X-Git-Tag: 2.3.0~2405 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ad2e15cd205d03416d2b6268081acc0871ad8e74;p=apache mod_charset_lite: Bypass translation when the source and dest charsets are the same. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@399668 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 995e42b09e..c29ff3b642 100644 --- 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] diff --git a/modules/filters/mod_charset_lite.c b/modules/filters/mod_charset_lite.c index 2e8a9e0942..2e3cf65642 100644 --- a/modules/filters/mod_charset_lite.c +++ b/modules/filters/mod_charset_lite.c @@ -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);