Commit e4c7cb71 authored by Jeff Trawick's avatar Jeff Trawick
Browse files

use non-'const char *' while building string to avoid warnings


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1199611 13f79535-47bb-0310-9956-ffa450edef68
parent ae3f4edb
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -231,11 +231,13 @@ static const char *construct_key(request_rec *r, const char *context,
    /* handle "special" context values */
    if (!strcmp(context, "directory")) {
        /* FIXME: are we at risk of this blowing up? */
        char *new_context;
        char *slash = strrchr(r->uri, '/');
        context = apr_palloc(r->pool, slash - r->uri +
        new_context = apr_palloc(r->pool, slash - r->uri +
                                 strlen(r->server->server_hostname) + 1);
        strcpy(context, r->server->server_hostname);
        strncat(context, r->uri, slash - r->uri);
        strcpy(new_context, r->server->server_hostname);
        strncat(new_context, r->uri, slash - r->uri);
        context = new_context;
    }
    else if (!strcmp(context, "server")) {
        context = r->server->server_hostname;