]> granicus.if.org Git - apache/commitdiff
Allow index.html.en and Index.html.FR to both be considered in negotation
authorWilliam A. Rowe Jr <wrowe@apache.org>
Mon, 18 Jun 2001 05:36:33 +0000 (05:36 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Mon, 18 Jun 2001 05:36:33 +0000 (05:36 +0000)
  on case insensitive platforms, only.

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

CHANGES
modules/http/mod_mime.c
modules/mappers/mod_negotiation.c

diff --git a/CHANGES b/CHANGES
index 749748df835a29dcbb4d0a92ba80aa0bc3657ae0..a08c210e151a0816204b07a69ca872bfcb864da7 100644 (file)
--- 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.
index bbeee8fe3d81990b2c817f414a9cab024505a15c..fe926d835ff38d3ed258a38c60aec7eaf4dd54b9 100644 (file)
@@ -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))) {
index 679460c0882d5eb7c1a23c44380996f1172f6428..11acb5691efdf4e37c55a9f42f1dc2aa986cefe6 100644 (file)
@@ -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] != '.') {