Commit 51bb6672 authored by Sander Striker's avatar Sander Striker
Browse files

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
parent d315db10
Loading
Loading
Loading
Loading
+6 −0
Changes for modules/cache/mod_cache.c: 6 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -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);