]> granicus.if.org Git - apache/commitdiff
When a :port is included in the CacheKeyBaseURL the ":" is lost from the actual cache...
authorChristophe Jaillet <jailletc36@apache.org>
Sat, 12 Jan 2019 07:51:48 +0000 (07:51 +0000)
committerChristophe Jaillet <jailletc36@apache.org>
Sat, 12 Jan 2019 07:51:48 +0000 (07:51 +0000)
When CacheKeyBaseURL is not use, the ":" is kept.

So, be consistent when building the key and keep the ":" in all cases.

PR 53915 [Rein Tollevik <rein basefarm.no>]

+ merge 2 lines of a comment to have it more compact

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

modules/cache/cache_storage.c

index 41f638c025ccd8d612b67fe27cded4159706c33b..dfda34b1c1d01a16d4a14c311db3b121b3e8eb94 100644 (file)
@@ -270,8 +270,7 @@ int cache_select(cache_request_rec *cache, request_rec *r)
              * language negotiated document in a different language by mistake.
              *
              * This code makes the assumption that the storage manager will
-             * cache the req_hdrs if the response contains a Vary
-             * header.
+             * cache the req_hdrs if the response contains a Vary header.
              *
              * RFC2616 13.6 and 14.44 describe the Vary mechanism.
              */
@@ -549,7 +548,7 @@ static apr_status_t cache_canonicalise_key(request_rec *r, apr_pool_t* p,
     }
     else {
         if (conf->base_uri && conf->base_uri->port_str) {
-            port_str = conf->base_uri->port_str;
+            port_str = apr_pstrcat(p, ":", conf->base_uri->port_str, NULL);
         }
         else if (conf->base_uri && conf->base_uri->hostname) {
             port_str = "";