]> granicus.if.org Git - apache/commitdiff
We must always use case-insensitive comparisons in mod_mime even if
authorJustin Erenkrantz <jerenkrantz@apache.org>
Thu, 25 Apr 2002 05:40:15 +0000 (05:40 +0000)
committerJustin Erenkrantz <jerenkrantz@apache.org>
Thu, 25 Apr 2002 05:40:15 +0000 (05:40 +0000)
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

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

CHANGES
modules/http/mod_mime.c

diff --git a/CHANGES b/CHANGES
index a51c6197a5045feb22045151851fa8cbd89e63e8..684d925d38bc265c8ac244aa9141f50daf534548 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -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]
 
index a281078b42183ab9681d4d04b9145e81549aaec0..bfd5dc18e923a5dd5a1139941c7a0d6cd75e8ca7 100644 (file)
@@ -279,9 +279,8 @@ static const char *add_extension_info(cmd_parms *cmd, void *m_,
     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 @@ static const char *remove_extension_info(cmd_parms *cmd, void *m_,
     }
     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 @@ static int mime_post_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp,
 
         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 @@ static int find_ct(request_rec *r)
 
         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,