args to the key generated for caching. This provides a unique
key for each virtual host and for each request with unique
args. [Paul J. Reder, args code provided by Kris Verbeeck]
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96773
13f79535-47bb-0310-9956-
ffa450edef68
Changes with Apache 2.0.41
+ *) mod_cache: cache_storage.c. Add the hostname and any request
+ args to the key generated for caching. This provides a unique
+ key for each virtual host and for each request with unique
+ args. [Paul J. Reder, args code provided by Kris Verbeeck]
+
*) mod_cache: Do not cache responses to GET requests with query
URLs if the origin server does not explicitly provide an
Expires header on the response (RFC 2616 Section 13.9)
apr_status_t cache_generate_key_default( request_rec *r, apr_pool_t*p, char**key )
{
- *key = apr_pstrdup(p,r->uri);
- return APR_SUCCESS;
+ if (r->hostname) {
+ *key = apr_pstrcat(p, r->hostname, r->uri, "?", r->args, NULL);
+ }
+ else {
+ *key = apr_pstrcat(p, r->uri, "?", r->args, NULL);
+ }
+ return APR_SUCCESS;
}
APR_IMPLEMENT_EXTERNAL_HOOK_RUN_FIRST(cache, CACHE, int, create_entity,