You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by je...@apache.org on 2002/04/25 07:40:15 UTC
cvs commit: httpd-2.0/modules/http mod_mime.c
jerenkrantz 02/04/24 22:40:15
Modified: . CHANGES
modules/http mod_mime.c
Log:
We must always use case-insensitive comparisons in mod_mime even if
our platform is not "case-blind." This matches 1.3 behavior and our
docs say that the extension argument is case-insensitive anyway.
This is case where the code fix is easier than the doc fix. =)
PR: 8223
Revision Changes Path
1.731 +3 -0 httpd-2.0/CHANGES
Index: CHANGES
===================================================================
RCS file: /home/cvs/httpd-2.0/CHANGES,v
retrieving revision 1.730
retrieving revision 1.731
diff -u -r1.730 -r1.731
--- CHANGES 24 Apr 2002 17:43:53 -0000 1.730
+++ CHANGES 25 Apr 2002 05:40:14 -0000 1.731
@@ -1,5 +1,8 @@
Changes with Apache 2.0.36
+ *) Make mod_mime use case-insensitive matching when examining
+ extensions on all platforms. PR 8223. [Justin Erenkrantz]
+
*) Add an intelligent error message should no proxy submodules be
valid to handle a request. PR 8407 [Graham Leggett]
1.82 +2 -10 httpd-2.0/modules/http/mod_mime.c
Index: mod_mime.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/http/mod_mime.c,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -r1.81 -r1.82
--- mod_mime.c 20 Mar 2002 17:41:54 -0000 1.81
+++ mod_mime.c 25 Apr 2002 05:40:15 -0000 1.82
@@ -279,9 +279,8 @@
char *key = apr_pstrdup(cmd->temp_pool, ext);
char *value = apr_pstrdup(cmd->pool, value_);
ap_str_tolower(value);
-#ifdef CASE_BLIND_FILESYSTEM
ap_str_tolower(key);
-#endif
+
if (*key == '.')
++key;
if (!m->extension_mappings) {
@@ -318,9 +317,7 @@
}
suffix = (attrib_info *) apr_array_push(m->remove_mappings);
suffix->name = apr_pstrdup(cmd->pool, ext);
-#ifdef CASE_BLIND_FILESYSTEM
ap_str_tolower(suffix->name);
-#endif
suffix->offset = (int) (long) cmd->info;
return NULL;
}
@@ -464,7 +461,7 @@
while (ll[0]) {
char *ext = ap_getword_conf(p, &ll);
- ap_str_tolower(ext); /* ??? */
+ ap_str_tolower(ext);
apr_hash_set(mime_type_extensions, ext, APR_HASH_KEY_STRING, ct);
}
}
@@ -778,12 +775,7 @@
found = 0;
-#ifdef CASE_BLIND_FILESYSTEM
- /* We have a basic problem that folks on case-crippled systems
- * expect anything and everything to succeed
- */
ap_str_tolower(ext);
-#endif
if (conf->extension_mappings != NULL) {
exinfo = (extension_info*)apr_hash_get(conf->extension_mappings,