diff options
author | Justin Erenkrantz <jerenkrantz@apache.org> | 2002-04-25 05:40:15 +0000 |
---|---|---|
committer | Justin Erenkrantz <jerenkrantz@apache.org> | 2002-04-25 05:40:15 +0000 |
commit | 8e1a89e1483e7776f874897e36721384a8bf2e3f (patch) | |
tree | 5bb00af418517a11b323490cc26f21176e957c47 /modules/http/mod_mime.c | |
parent | cd4b403c6440e5c660035647aa19581108a93df8 (diff) | |
download | httpd-8e1a89e1483e7776f874897e36721384a8bf2e3f.tar.gz |
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
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94789 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/http/mod_mime.c')
-rw-r--r-- | modules/http/mod_mime.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/modules/http/mod_mime.c b/modules/http/mod_mime.c index a281078b42..bfd5dc18e9 100644 --- a/modules/http/mod_mime.c +++ b/modules/http/mod_mime.c @@ -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, |