]> git.ipfire.org Git - thirdparty/apache/httpd.git/commit
Fix Expires (freshness) handling in mod_cache.
authorJustin Erenkrantz <jerenkrantz@apache.org>
Tue, 21 Sep 2004 22:56:23 +0000 (22:56 +0000)
committerJustin Erenkrantz <jerenkrantz@apache.org>
Tue, 21 Sep 2004 22:56:23 +0000 (22:56 +0000)
commit0427774f8d3055317f9c5d7f36fc911062cf3007
tree29ed46fc18a63e9a1e7285f14aa346a1b167906a
parentfdc9fe0f0bf36c8bf49251a7385c30d70765b815
Fix Expires (freshness) handling in mod_cache.

Previously, if the cached copy was stale, the response would go into an
indeterminate state.  Therefore, the freshness check must be done before we
'accept' the response and, if it fails (i.e.  stale), we can't allow any side
effects.

This caused a number of changes to how mod_disk_cache reads its headers as
ap_scan_script_header_err() purposely has side-effects and that's
unacceptable.  So, factor out only what we need.

Also, remove the broken conditional filter code as you can't reliably alter the
filter list once the response is started.  (Regardless, cache_select_url()
has the freshness checks now.)

Assist to Sascha Schumann for reporting mod_cache was busted.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105236 13f79535-47bb-0310-9956-ffa450edef68
CHANGES
modules/experimental/cache_storage.c
modules/experimental/cache_util.c
modules/experimental/mod_cache.c
modules/experimental/mod_cache.h
modules/experimental/mod_disk_cache.c
modules/experimental/mod_mem_cache.c