httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 54462] New: Case sensitive option in "CacheDisable"
Date Tue, 22 Jan 2013 06:21:59 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=54462

            Bug ID: 54462
           Summary: Case sensitive option in "CacheDisable"
           Product: Apache httpd-2
           Version: 2.4.3
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_cache
          Assignee: bugs@httpd.apache.org
          Reporter: tixu@cs.ucsd.edu
    Classification: Unclassified

The "CacheDisable" in mod_cache uses case sensitive string comparison function,
i.e., strcmp, which conflicts with the case insensitivity of Apache's
configuration design. According to my understanding, httpd champions case
insensitivity for both configuration directive and configuration options, e.g.,
the "None" option for "CacheIgnoreHeaders" as follows.

AP_INIT_ITERATE("CacheIgnoreHeaders", add_ignore_header,
static const char *add_ignore_header(cmd_parms *parms, void *dummy, 
                                     const char *header)
{ ...
  if (!strcasecmp(header, "None")) {
      /* if header None is listed clear array */
      conf->ignore_headers->nelts = 0;
  }
  ...
}

The fix is straightforward as follows:

--- modules/cache/mod_cache.c   2013-01-21 22:11:28.712172966 -0800
+++ modules/cache/mod_cache.c   2012-08-14 14:14:34.000000000 -0700
@@ -2064,7 +2064,7 @@
                                                   &cache_module);

     if (parms->path) {
-        if (!strcasecmp(url, "on")) {
+        if (!strcmp(url, "on")) {
             dconf->disable = 1;
             dconf->disable_set = 1;
             return NULL;

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message