Commit d155fd13 authored by Ruediger Pluem's avatar Ruediger Pluem
Browse files

* Cleanup the code by replacing some inline code to lower-case a string with

  ap_str_tolower.

Proposed by: Joe Orton


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@408729 13f79535-47bb-0310-9956-ffa450edef68
parent 14c5a6c0
Loading
Loading
Loading
Loading
+4 −8
Changes for modules/cache/cache_storage.c: 4 added lines, 8 removed lines.
Original line number Diff line number Diff line
@@ -351,10 +351,8 @@ apr_status_t cache_generate_key_default(request_rec *r, apr_pool_t* p,
    }
    else if(r->parsed_uri.hostname) {
        /* Copy the parsed uri hostname */
        hn = apr_pcalloc(p, strlen(r->parsed_uri.hostname) + 1);
        for (i = 0; r->parsed_uri.hostname[i]; i++) {
            hn[i] = apr_tolower(r->parsed_uri.hostname[i]);
        }
        hn = apr_pstrdup(p, r->parsed_uri.hostname);
        ap_str_tolower(hn);
        /* const work-around */
        hostname = hn;
    }
@@ -374,10 +372,8 @@ apr_status_t cache_generate_key_default(request_rec *r, apr_pool_t* p,
     */
    if (r->proxyreq && r->parsed_uri.scheme) {
        /* Copy the scheme and lower-case it */
        lcs = apr_pcalloc(p, strlen(r->parsed_uri.scheme) + 1);
        for (i = 0; r->parsed_uri.scheme[i]; i++) {
            lcs[i] = apr_tolower(r->parsed_uri.scheme[i]);
        }
        lcs = apr_pstrdup(p, r->parsed_uri.scheme);
        ap_str_tolower(lcs);
        /* const work-around */
        scheme = lcs;
    }