You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by mi...@apache.org on 2011/08/15 23:28:08 UTC
svn commit: r1158022 - in /httpd/httpd/trunk: CHANGES
modules/cache/mod_cache.c
Author: minfrin
Date: Mon Aug 15 21:28:08 2011
New Revision: 1158022
URL: http://svn.apache.org/viewvc?rev=1158022&view=rev
Log:
mod_cache: Ensure that CacheDisable can correctly appear within
a LocationMatch.
Modified:
httpd/httpd/trunk/CHANGES
httpd/httpd/trunk/modules/cache/mod_cache.c
Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=1158022&r1=1158021&r2=1158022&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Mon Aug 15 21:28:08 2011
@@ -1,6 +1,9 @@
-*- coding: utf-8 -*-
Changes with Apache 2.3.15
+ *) mod_cache: Ensure that CacheDisable can correctly appear within
+ a LocationMatch. [Graham Leggett]
+
*) mod_cache: Fix the moving of the CACHE filter, which erroneously
stood down if the original filter was not added by configuration.
[Graham Leggett]
Modified: httpd/httpd/trunk/modules/cache/mod_cache.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/cache/mod_cache.c?rev=1158022&r1=1158021&r2=1158022&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/cache/mod_cache.c (original)
+++ httpd/httpd/trunk/modules/cache/mod_cache.c Mon Aug 15 21:28:08 2011
@@ -2095,27 +2095,23 @@ static const char *add_cache_disable(cmd
return err;
}
- if (parms->path && !strcmp(url, "on")) {
- url = parms->path;
- }
- if (url[0] != '/' && !ap_strchr_c(url, ':')) {
- return "CacheDisable must specify a path or an URL, or when in a Location, "
- "the word 'on'.";
- }
-
- if (parms->path && strncmp(parms->path, url, strlen(parms->path))) {
- return "When in a Location, CacheDisable must specify a path or an URL below "
- "that location.";
- }
-
conf =
(cache_server_conf *)ap_get_module_config(parms->server->module_config,
&cache_module);
if (parms->path) {
- dconf->disable = 1;
- dconf->disable_set = 1;
- return NULL;
+ if (!strcmp(url, "on")) {
+ dconf->disable = 1;
+ dconf->disable_set = 1;
+ return NULL;
+ }
+ else {
+ return "CacheDisable must be followed by the word 'on' when in a Location.";
+ }
+ }
+
+ if (!url || (url[0] != '/' && !ap_strchr_c(url, ':'))) {
+ return "CacheDisable must specify a path or an URL.";
}
new = apr_array_push(conf->cachedisable);