Commit 9600a2d2 authored by Jeff Trawick's avatar Jeff Trawick
Browse files

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
parent 8937df83
Loading
Loading
Loading
Loading
+3 −0
Changes for CHANGES: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -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]
+2 −0
Changes for modules/filters/mod_charset_lite.c: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -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);