]> granicus.if.org Git - apache/commitdiff
* Fix const compiler warning introduced by r407357.
authorRuediger Pluem <rpluem@apache.org>
Sun, 21 May 2006 10:29:09 +0000 (10:29 +0000)
committerRuediger Pluem <rpluem@apache.org>
Sun, 21 May 2006 10:29:09 +0000 (10:29 +0000)
Noticed by: Joe Orton

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

CHANGES
modules/cache/cache_storage.c

diff --git a/CHANGES b/CHANGES
index c1093c7ed9bc69698e6ed9125c7c0470d06dc3f3..297e4c5660180f4fa617310d18abb8a2c7559cc9 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -3,7 +3,7 @@ Changes with Apache 2.3.0
   [Remove entries to the current 2.0 and 2.2 section below, when backported]
 
   *) mod_cache: Make caching of reverse SSL proxies possible again. PR 39593.
-     [Ruediger Pluem]
+     [Ruediger Pluem, Joe Orton]
 
   *) Add support for fcgi:// proxies to mod_rewrite.
      [Markus Schiegl <ms schiegl.com>]
index 9db8bbba6b4ffda4858ce2ce46bee420b0a944cb..4d2474eff18983d07ef2579f670db3ca71f1563e 100644 (file)
@@ -320,8 +320,8 @@ int cache_select(request_rec *r)
 apr_status_t cache_generate_key_default(request_rec *r, apr_pool_t* p,
                                         char**key)
 {
-    char *port_str, *scheme, *hn;
-    const char * hostname;
+    char *port_str, *hn, *lcs;
+    const char *hostname, *scheme;
     int i;
 
     /*
@@ -373,11 +373,13 @@ apr_status_t cache_generate_key_default(request_rec *r, apr_pool_t* p,
      * manner (see above why this is needed).
      */
     if (r->proxyreq && r->parsed_uri.scheme) {
-        /* Copy the scheme */
-        scheme = apr_pcalloc(p, strlen(r->parsed_uri.scheme) + 1);
+        /* 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++) {
-            scheme[i] = apr_tolower(r->parsed_uri.scheme[i]);
+            lcs[i] = apr_tolower(r->parsed_uri.scheme[i]);
         }
+        /* const work-around */
+        scheme = lcs;
     }
     else {
         scheme = ap_http_scheme(r);