httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n..@apache.org
Subject svn commit: r1199565 - /httpd/httpd/trunk/modules/aaa/mod_authn_socache.c
Date Wed, 09 Nov 2011 00:28:51 GMT
Author: niq
Date: Wed Nov  9 00:28:51 2011
New Revision: 1199565

URL: http://svn.apache.org/viewvc?rev=1199565&view=rev
Log:
mod_authn_socache: fix namespacing issue
http://marc.info/?l=apache-httpd-dev&m=131823772714741&w=2

Modified:
    httpd/httpd/trunk/modules/aaa/mod_authn_socache.c

Modified: httpd/httpd/trunk/modules/aaa/mod_authn_socache.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/aaa/mod_authn_socache.c?rev=1199565&r1=1199564&r2=1199565&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/aaa/mod_authn_socache.c (original)
+++ httpd/httpd/trunk/modules/aaa/mod_authn_socache.c Wed Nov  9 00:28:51 2011
@@ -232,7 +232,11 @@ static const char *construct_key(request
     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;



Mime
View raw message