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: [email protected]
          Reporter: [email protected]
    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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to