]> granicus.if.org Git - apache/commitdiff
On an EBCDIC machine, be willing to translate mod_autoindex-
authorJeff Trawick <trawick@apache.org>
Wed, 25 Oct 2000 17:32:52 +0000 (17:32 +0000)
committerJeff Trawick <trawick@apache.org>
Wed, 25 Oct 2000 17:32:52 +0000 (17:32 +0000)
generated output.  Otherwise, it doesn't look too cool.

XXX This isn't a perfect fix because this doesn't trigger us
to convert from the charset of the source code to ASCII.  The
general solution seems to be to allow a generator to set an
indicator in the r specifying that the body is coded in the
implementation character set (i.e., the charset of the source
code).  This would get several different types of documents
translated properly: mod_autoindex output, mod_status output,
mod_info output, hard-coded error documents, etc.

Problem reported by: Martin Kraemer

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

modules/experimental/mod_charset_lite.c

index 372fd8ac4ce602a145165baddd23039ce909f8a6..a6f0172de7f72fe9e2b69ff27f57b2dc68ff08db 100644 (file)
@@ -291,6 +291,21 @@ static int find_code_page(request_rec *r)
  */
              
     if (strncasecmp(mime_type, "text/", 5) &&
+#ifdef CHARSET_EBCDIC
+        /* On an EBCDIC machine, be willing to translate mod_autoindex-
+         * generated output.  Otherwise, it doesn't look too cool.
+         *
+         * XXX This isn't a perfect fix because this doesn't trigger us
+         * to convert from the charset of the source code to ASCII.  The
+         * general solution seems to be to allow a generator to set an
+         * indicator in the r specifying that the body is coded in the
+         * implementation character set (i.e., the charset of the source
+         * code).  This would get several different types of documents
+         * translated properly: mod_autoindex output, mod_status output,
+         * mod_info output, hard-coded error documents, etc.
+         */
+        strcmp(mime_type, DIR_MAGIC_TYPE) &&
+#endif
         strncasecmp(mime_type, "message/", 8)) {
         if (dc->debug >= DBGLVL_GORY) {
             ap_log_rerror(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, r,