From 6bd89dd03b52657d66a388ca59f6007f015e1b4c Mon Sep 17 00:00:00 2001 From: Jeff Trawick Date: Wed, 25 Oct 2000 17:32:52 +0000 Subject: [PATCH] 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. 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 | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/modules/experimental/mod_charset_lite.c b/modules/experimental/mod_charset_lite.c index 372fd8ac4c..a6f0172de7 100644 --- a/modules/experimental/mod_charset_lite.c +++ b/modules/experimental/mod_charset_lite.c @@ -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, -- 2.40.0