You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2013/01/22 07:21:59 UTC

[Bug 54462] New: Case sensitive option in "CacheDisable"

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


[Bug 54462] Case sensitive option in "CacheDisable"

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54462

Tianyin Xu <ti...@cs.ucsd.edu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |PatchAvailable
                 CC|                            |tixu@cs.ucsd.edu

-- 
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


[Bug 54462] Case sensitive option in "CacheDisable"

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54462

Christophe JAILLET <ch...@wanadoo.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #4 from Christophe JAILLET <ch...@wanadoo.fr> ---
Fixed on trunk. r1464721

Thanks for the report.

-- 
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


[Bug 54462] Case sensitive option in "CacheDisable"

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54462

--- Comment #2 from Tianyin Xu <ti...@cs.ucsd.edu> ---
Ooops, sorry, I messed up my patch...

It should be:


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

     if (parms->path) {
-        if (!strcmp(url, "on")) {
+        if (!strcasecmp(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


[Bug 54462] Case sensitive option in "CacheDisable"

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54462

--- Comment #1 from Tianyin Xu <ti...@cs.ucsd.edu> ---
Created attachment 29876
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29876&action=edit
Case insensitive for "CacheDisable"

-- 
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


[Bug 54462] Case sensitive option in "CacheDisable"

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54462

Tianyin Xu <ti...@cs.ucsd.edu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #29876|0                           |1
        is obsolete|                            |

--- Comment #3 from Tianyin Xu <ti...@cs.ucsd.edu> ---
Created attachment 29877
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29877&action=edit
Case insensitive for "CacheDisable" (updated)

-- 
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


[Bug 54462] Case sensitive option in "CacheDisable"

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54462

--- Comment #5 from Graham Leggett <mi...@sharp.fm> ---
Backported to v2.4.5.

-- 
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