]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
mod_mime: don't adjust case in filename components we don't use
authorNick Kew <niq@apache.org>
Mon, 8 Sep 2008 15:52:59 +0000 (15:52 +0000)
committerNick Kew <niq@apache.org>
Mon, 8 Sep 2008 15:52:59 +0000 (15:52 +0000)
PR 43250, patch by Basant Kumar Kukreja

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

CHANGES
modules/http/mod_mime.c

diff --git a/CHANGES b/CHANGES
index 08e0c55b937cf8b208c0c524b12af3b0878119d4..9664c2611167d4e88db6c251c0768e2dba25eb85 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,10 @@
 Changes with Apache 2.3.0
 [ When backported to 2.2.x, remove entry from this file ]
 
+  *) Don't adjust case in pathname components that are not of interest
+     to mod_mime.  Fixes mod_negotiation's use of such components.
+     PR 43250 [Basant Kumar Kukreja <basant.kukreja sun.com>]
+
   *) Add new LogFormat parameter, %k, which logs the number of
      keepalive requests on this connection for this request..
      [Dan Poirier <poirier pobox.com>]
index d9d8b101711d51e71d0eef3570fca3577316dd96..d1b84b1efb3fbd99cbe976ff176c94332be59812 100644 (file)
@@ -785,6 +785,7 @@ static int find_ct(request_rec *r)
     while (*fn && (ext = ap_getword(r->pool, &fn, '.'))) {
         const extension_info *exinfo = NULL;
         int found;
+        char *extcase;
 
         if (*ext == '\0') {  /* ignore empty extensions "bad..html" */
             continue;
@@ -792,6 +793,9 @@ static int find_ct(request_rec *r)
 
         found = 0;
 
+        /* Save the ext in extcase before converting it to lower case.
+         */
+        extcase = apr_pstrdup(r->pool, ext);
         ap_str_tolower(ext);
 
         if (conf->extension_mappings != NULL) {
@@ -885,7 +889,7 @@ static int find_ct(request_rec *r)
             found_metadata = 1;
         }
         else {
-            *((const char **) apr_array_push(exception_list)) = ext;
+            *((const char **) apr_array_push(exception_list)) = extcase;
         }
     }