From fcb4674f0d57502a7a77edc634954c13ab0b2eb9 Mon Sep 17 00:00:00 2001 From: Sander Striker Date: Thu, 3 Feb 2005 21:15:36 +0000 Subject: [PATCH] Error out on configurations where the cache provider starts with a '/'. Saves certain people a bit of time figuring out why their caching doesn't work... * modules/cache/mod_cache.c (add_cache_enable): Throw an error when a provider starting with a '/' is encountered. The user probably switched arguments. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@151232 13f79535-47bb-0310-9956-ffa450edef68 --- modules/cache/mod_cache.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/cache/mod_cache.c b/modules/cache/mod_cache.c index d0959636e66..c0afe5a474b 100644 --- a/modules/cache/mod_cache.c +++ b/modules/cache/mod_cache.c @@ -863,6 +863,12 @@ static const char *add_cache_enable(cmd_parms *parms, void *dummy, cache_server_conf *conf; struct cache_enable *new; + if (*type == '/') { + return apr_psprintf(parms->pool, + "provider (%s) starts with a '/'. Are url and provider switched?", + type); + } + conf = (cache_server_conf *)ap_get_module_config(parms->server->module_config, &cache_module); -- 2.47.2