diff options
author | Justin Erenkrantz <jerenkrantz@apache.org> | 2007-05-17 07:43:18 +0200 |
---|---|---|
committer | Justin Erenkrantz <jerenkrantz@apache.org> | 2007-05-17 07:43:18 +0200 |
commit | 35713c177fee916dbbb56fd8bcb1424ecdb47b79 (patch) | |
tree | d317bee48586f1c38905c9a8648e8f87faac71f0 /modules/cache | |
parent | Doccos update... sync up to current time. (diff) | |
download | apache2-35713c177fee916dbbb56fd8bcb1424ecdb47b79.tar.xz apache2-35713c177fee916dbbb56fd8bcb1424ecdb47b79.zip |
RFC 2616 13.2.1 calls out max-age as being a valid 'explicit expiration time',
so per Sec. 13.9 permit queries with just max-age instead of only Expires.
* modules/cache/mod_cache.c
(cache_save_filter): Be closer to RFC 2616's intent for query arguments.
* CHANGES: Update.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@538807 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/cache')
-rw-r--r-- | modules/cache/mod_cache.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/modules/cache/mod_cache.c b/modules/cache/mod_cache.c index 455b9594ff..a2f4f3ef45 100644 --- a/modules/cache/mod_cache.c +++ b/modules/cache/mod_cache.c @@ -452,11 +452,12 @@ static int cache_save_filter(ap_filter_t *f, apr_bucket_brigade *in) /* if a Expires header is in the past, don't cache it */ reason = "Expires header already expired, not cacheable"; } - else if (!conf->ignorequerystring && r->parsed_uri.query && exps == NULL) { - /* if query string present but no expiration time, don't cache it - * (RFC 2616/13.9) + else if (!conf->ignorequerystring && r->parsed_uri.query && exps == NULL && + !ap_cache_liststr(NULL, cc_out, "max-age", NULL)) { + /* if a query string is present but no explicit expiration time, + * don't cache it (RFC 2616/13.9 & 13.2.1) */ - reason = "Query string present but no expires header"; + reason = "Query string present but no explicit expiration time"; } else if (r->status == HTTP_NOT_MODIFIED && !cache->handle && !cache->stale_handle) { |