Commit ae7f6ae2 authored by Nick Kew's avatar Nick Kew
Browse files

mod_authn_socache: fix namespacing issue

parent 7a6ab1a7
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -232,7 +232,11 @@ static const char *construct_key(request_rec *r, const char *context,
    if (!strcmp(context, "directory")) {
        /* FIXME: are we at risk of this blowing up? */
        char *slash = strrchr(r->uri, '/');
        context = apr_pstrndup(r->pool, r->uri, slash - r->uri + 1);
        context = apr_palloc(r->pool, slash - r->uri
                             + strlen(r->server->server_hostname) + 2);
        strcpy(context, r->server->server_hostname);
        strcat(context, ":");
        strncat(context, r->uri, slash - r->uri);
    }
    else if (!strcmp(context, "server")) {
        context = r->server->server_hostname;