httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From minf...@apache.org
Subject svn commit: r463477 - in /httpd/httpd/branches/2.2.x: CHANGES STATUS modules/filters/mod_ext_filter.c
Date Thu, 12 Oct 2006 22:34:43 GMT
Author: minfrin
Date: Thu Oct 12 15:34:40 2006
New Revision: 463477

URL: http://svn.apache.org/viewvc?view=rev&rev=463477
Log:
mod_ext_filter: Handle filter names which include capital letters.
PR 40323.

+1: trawick, rpluem, jim

Modified:
    httpd/httpd/branches/2.2.x/CHANGES
    httpd/httpd/branches/2.2.x/STATUS
    httpd/httpd/branches/2.2.x/modules/filters/mod_ext_filter.c

Modified: httpd/httpd/branches/2.2.x/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/CHANGES?view=diff&rev=463477&r1=463476&r2=463477
==============================================================================
--- httpd/httpd/branches/2.2.x/CHANGES [utf-8] (original)
+++ httpd/httpd/branches/2.2.x/CHANGES [utf-8] Thu Oct 12 15:34:40 2006
@@ -1,6 +1,9 @@
                                                         -*- coding: utf-8 -*-
 Changes with Apache 2.2.4
 
+  *) mod_ext_filter: Handle filter names which include capital letters.
+     PR 40323.  [Jeff Trawick]
+
   *) mod_isapi: Avoid double trailing slashes in HSE_REQ_MAP_URL_TO_PATH
      support.  Also corrects the slashes for Windows.  PR 15993. [William Rowe]
 

Modified: httpd/httpd/branches/2.2.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/STATUS?view=diff&rev=463477&r1=463476&r2=463477
==============================================================================
--- httpd/httpd/branches/2.2.x/STATUS (original)
+++ httpd/httpd/branches/2.2.x/STATUS Thu Oct 12 15:34:40 2006
@@ -77,12 +77,6 @@
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-    * mod_ext_filter: Handle filter names which include capital letters.
-      PR 40323.
-      Trunk patch, which applies:
-        http://svn.apache.org/viewvc?view=rev&revision=440028
-      +1: trawick, rpluem, jim
-
     * core: Deal with the widespread use of apr_status_t return values
       as HTTP status codes, as documented in PR#31759 (a bug shared by
       the default handler, mod_cgi, mod_cgid, mod_proxy, and probably

Modified: httpd/httpd/branches/2.2.x/modules/filters/mod_ext_filter.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/modules/filters/mod_ext_filter.c?view=diff&rev=463477&r1=463476&r2=463477
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/filters/mod_ext_filter.c (original)
+++ httpd/httpd/branches/2.2.x/modules/filters/mod_ext_filter.c Thu Oct 12 15:34:40 2006
@@ -206,6 +206,7 @@
                                              &ext_filter_module);
     const char *token;
     const char *name;
+    char *normalized_name;
     ef_filter_t *filter;
 
     name = ap_getword_white(cmd->pool, &args);
@@ -213,7 +214,16 @@
         return "Filter name not found";
     }
 
-    if (apr_hash_get(conf->h, name, APR_HASH_KEY_STRING)) {
+    /* During request processing, we find information about the filter
+     * by looking up the filter name provided by core server in our
+     * hash table.  But the core server has normalized the filter
+     * name by converting it to lower case.  Thus, when adding the
+     * filter to our hash table we have to use lower case as well.
+     */
+    normalized_name = apr_pstrdup(cmd->pool, name);
+    ap_str_tolower(normalized_name);
+
+    if (apr_hash_get(conf->h, normalized_name, APR_HASH_KEY_STRING)) {
         return apr_psprintf(cmd->pool, "ExtFilter %s is already defined",
                             name);
     }
@@ -222,7 +232,7 @@
     filter->name = name;
     filter->mode = OUTPUT_FILTER;
     filter->ftype = AP_FTYPE_RESOURCE;
-    apr_hash_set(conf->h, name, APR_HASH_KEY_STRING, filter);
+    apr_hash_set(conf->h, normalized_name, APR_HASH_KEY_STRING, filter);
 
     while (*args) {
         while (apr_isspace(*args)) {



Mime
View raw message