From: Jeff Trawick Date: Wed, 25 Oct 2000 17:32:52 +0000 (+0000) Subject: On an EBCDIC machine, be willing to translate mod_autoindex- X-Git-Tag: APACHE_2_0_ALPHA_8~238 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6bd89dd03b52657d66a388ca59f6007f015e1b4c;p=apache 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 --- 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,