Commit a8cedc23 authored by Nick Kew's avatar Nick Kew
Browse files

mod_mime: don't adjust case in filename components we don't use

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
parent 9d4758bc
Loading
Loading
Loading
Loading
+4 −0
Changes for CHANGES: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -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>]
+5 −1
Changes for modules/http/mod_mime.c: 5 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -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;
        }
    }