]> granicus.if.org Git - apache/commit
Try to correctly follow RFC 2616 13.3 on validating stale cache responses by
authorJustin Erenkrantz <jerenkrantz@apache.org>
Tue, 28 Sep 2004 17:37:54 +0000 (17:37 +0000)
committerJustin Erenkrantz <jerenkrantz@apache.org>
Tue, 28 Sep 2004 17:37:54 +0000 (17:37 +0000)
commit7d2caa8d9b4270a3d85f8d7070b02e8d8d19c63b
treec01057e9a3330ceccffcc0a662f1ee4cd9ac8553
parentd902d5e491614f30e06812f44e2208f1f2a08319
Try to correctly follow RFC 2616 13.3 on validating stale cache responses by
teaching mod_cache's cache_select_url and cache_save_filter how to deal with
this corner case.

* modules/experimental/cache_storage.c
  (cache_select_url): If we have a stale entry, save the handle so that
  cache_save_filter can use it later, and make the request conditional.
* modules/experimental/cache_util.c
  (ap_cache_request_is_conditional): Take in a table rather than request_rec.
* modules/experimental/mod_cache.c
  (cache_out_filter): Fix bogus comment.
  (cache_save_filter): If we have already responded to the client, block all
  data; correctly merge in 'stale' handles that are not really stale; set
  r->status where appropriate; serve cached response if 'fresh'
* modules/experimental/mod_cache.h
  (cache_info): Add a status field.
  (cache_request_rec): Add stale handle field and note we may block responses.
  (ap_cache_request_is_conditional): Update prototype.
* modules/experimental/mod_disk_cache.c
  (store_headers): Use cache_info status instead of r->status.
* modules/experimental/mod_mem_cache.c
  (recall_headers): Properly recall the status field.
  (store_headers): Store the status field via cache_info status.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@105322 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