From: Nick Kew Date: Mon, 8 Sep 2008 15:52:59 +0000 (+0000) Subject: mod_mime: don't adjust case in filename components we don't use X-Git-Tag: 2.3.0~315 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0e3d53aeaee3b48fb7f414fc95e94a6d8120be78;p=thirdparty%2Fapache%2Fhttpd.git 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 --- diff --git a/CHANGES b/CHANGES index 08e0c55b937..9664c261116 100644 --- 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 ] + *) Add new LogFormat parameter, %k, which logs the number of keepalive requests on this connection for this request.. [Dan Poirier ] diff --git a/modules/http/mod_mime.c b/modules/http/mod_mime.c index d9d8b101711..d1b84b1efb3 100644 --- a/modules/http/mod_mime.c +++ b/modules/http/mod_mime.c @@ -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; } }