Skip to content
Commit 3a37af26 authored by Justin Erenkrantz's avatar Justin Erenkrantz
Browse files

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
parent c32dcda7
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment