]> granicus.if.org Git - apache/commitdiff
mod_authn_socache: tidy up r1199565.
authorNick Kew <niq@apache.org>
Wed, 9 Nov 2011 00:32:49 +0000 (00:32 +0000)
committerNick Kew <niq@apache.org>
Wed, 9 Nov 2011 00:32:49 +0000 (00:32 +0000)
And we don't need that separator in the namespacing string -
it's not for human consumption.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1199567 13f79535-47bb-0310-9956-ffa450edef68

modules/aaa/mod_authn_socache.c

index 1f5f4b7e83a9df8b014f09d34f7ab9ef59d0735b..a11cf31617e4edbe600ec509b935e822d33a488e 100644 (file)
@@ -232,10 +232,9 @@ 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_palloc(r->pool, slash - r->uri
-                             + strlen(r->server->server_hostname) + 2);
+        context = apr_palloc(r->pool, slash - r->uri +
+                                      strlen(r->server->server_hostname) + 1);
         strcpy(context, r->server->server_hostname);
-        strcat(context, ":");
         strncat(context, r->uri, slash - r->uri);
     }
     else if (!strcmp(context, "server")) {