From: William A. Rowe Jr Date: Mon, 18 Jun 2001 05:36:33 +0000 (+0000) Subject: Allow index.html.en and Index.html.FR to both be considered in negotation X-Git-Tag: 2.0.19~62 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=546f8d040c82e4c73a0a2391b91635872cd6abc1;p=apache Allow index.html.en and Index.html.FR to both be considered in negotation on case insensitive platforms, only. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89381 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 749748df83..a08c210e15 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,9 @@ Changes with Apache 2.0.19-dev + *) Solve case-insensitive platforms' confusion about negotiated + filenames, allowing files of differnt case to match in choosing + the document to serve. [William Rowe] + *) Fix brokenness when ThreadsPerChild is higher than the built-in limit. We left ap_threads_per_child at the higher value which led to segfaults when doing certain scoreboard operations. diff --git a/modules/http/mod_mime.c b/modules/http/mod_mime.c index bbeee8fe3d..fe926d835f 100644 --- a/modules/http/mod_mime.c +++ b/modules/http/mod_mime.c @@ -683,6 +683,13 @@ static int find_ct(request_rec *r) while ((ext = ap_getword(r->pool, &fn, '.')) && *ext) { int 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 + /* Check for Content-Type */ if ((type = apr_table_get(conf->forced_types, ext)) || (type = apr_table_get(hash_buckets[hash(*ext)], ext))) { diff --git a/modules/mappers/mod_negotiation.c b/modules/mappers/mod_negotiation.c index 679460c088..11acb5691e 100644 --- a/modules/mappers/mod_negotiation.c +++ b/modules/mappers/mod_negotiation.c @@ -935,7 +935,11 @@ static int read_types_multi(negotiation_state *neg) request_rec *sub_req; /* Do we have a match? */ +#ifdef CASE_BLIND_FILESYSTEM + if (strncasecmp(dirent.name, filp, prefix_len)) { +#else if (strncmp(dirent.name, filp, prefix_len)) { +#endif continue; } if (dirent.name[prefix_len] != '.') {