diff options
author | Graham Leggett <minfrin@apache.org> | 2010-06-04 02:17:16 +0200 |
---|---|---|
committer | Graham Leggett <minfrin@apache.org> | 2010-06-04 02:17:16 +0200 |
commit | fd646c8e2b585ac198d03f327413510ea43fc195 (patch) | |
tree | 33ff1bdf2507250e8f1f06b5c10a06bac0b2055c /modules/cache/mod_disk_cache.c | |
parent | Fix a bug where if the cache quick handler is switched off, and the CACHE (diff) | |
download | apache2-fd646c8e2b585ac198d03f327413510ea43fc195.tar.xz apache2-fd646c8e2b585ac198d03f327413510ea43fc195.zip |
mod_disk_cache: Decline the opportunity to cache if the response is
a 206 Partial Content. This stops a reverse proxied partial response
from becoming cached, and then being served in subsequent responses.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@951222 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r-- | modules/cache/mod_disk_cache.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/cache/mod_disk_cache.c b/modules/cache/mod_disk_cache.c index b65c8bca4c..d0dd823c90 100644 --- a/modules/cache/mod_disk_cache.c +++ b/modules/cache/mod_disk_cache.c @@ -333,6 +333,14 @@ static int create_entity(cache_handle_t *h, request_rec *r, const char *key, apr return DECLINED; } + /* we don't support caching of range requests (yet) */ + if (r->status == HTTP_PARTIAL_CONTENT) { + ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, + "disk_cache: URL %s partial content response not cached", + key); + return DECLINED; + } + /* Note, len is -1 if unknown so don't trust it too hard */ if (len > conf->maxfs) { ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, |