]> granicus.if.org Git - apache/commitdiff
Error out on configurations where the cache provider starts with a '/'.
authorSander Striker <striker@apache.org>
Thu, 3 Feb 2005 21:15:36 +0000 (21:15 +0000)
committerSander Striker <striker@apache.org>
Thu, 3 Feb 2005 21:15:36 +0000 (21:15 +0000)
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

index d0959636e66fa3677858576ad140db087c79d373..c0afe5a474bbf134d36452b4ae934280edf72003 100644 (file)
@@ -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);