diff options
author | Christophe Jaillet <jailletc36@apache.org> | 2019-01-12 07:51:48 +0000 |
---|---|---|
committer | Christophe Jaillet <jailletc36@apache.org> | 2019-01-12 07:51:48 +0000 |
commit | 393aa13887dc6c8510001cfa8b4024382d5f8ad8 (patch) | |
tree | a0baa1f4a3cfd36c14d61a7f43ed9e620168b7ee /modules/cache | |
parent | 0447ee185c175341f65d4bcfaf722a83e6aec79e (diff) | |
download | httpd-393aa13887dc6c8510001cfa8b4024382d5f8ad8.tar.gz |
When a :port is included in the CacheKeyBaseURL the ":" is lost from the actual cache key value. This doesn't harm apache by itself, the real problem arise if some external program which "knows" about the cache keys structure is used to modify the cache.
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
Diffstat (limited to 'modules/cache')
-rw-r--r-- | modules/cache/cache_storage.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/modules/cache/cache_storage.c b/modules/cache/cache_storage.c index 41f638c025..dfda34b1c1 100644 --- a/modules/cache/cache_storage.c +++ b/modules/cache/cache_storage.c @@ -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 = ""; |