* modules/cache/mod_cache.c
(cache_save_filter): Properly handle HEAD responses when we have a stale handle.
(This patch was revised by Justin/Ruediger.)
Submitted by: Niklas Edmundsson
Reviewed by: Justin, Ruediger
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@539620 13f79535-47bb-0310-9956-ffa450edef68
representation if Expires is not set.
* modules/cache/mod_cache.c
(cache_save_filter): If Cache-Control max-age is set and Expires isn't,
let that value control our expiration.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@539063 13f79535-47bb-0310-9956-ffa450edef68
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
even if no expiration time is specified. Futhermore the query string will not
be used for key generation such that requests to the same URI path, but with
different query strings are mapped to the same cache entity. Turning this
setting to ON violates RFC 2616/13.9 and thus it is turned off by default.
PR: 41484
Submitted by: Fredrik Widlund <fredrik.widlund qbrick.com>
Reviewed by: rpluem
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@504183 13f79535-47bb-0310-9956-ffa450edef68
as r->args could have been changed (e.g. via mod_rewrite) after the quick
handler hook. This causes resources to be stored under a key, where they
cannot be fetched again in the quick handler.
PR: 40805
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@476625 13f79535-47bb-0310-9956-ffa450edef68
hook, giving each cache backend the ability to make a better
decision as to how it will allocate the tasks of writing to the
cache and writing to the network. Previously the write to the
cache task needed to be complete before the same brigade was
written to the network, and this caused timing and memory issues
on large cached files. This fix replaces the previous fix for
PR39380.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@468373 13f79535-47bb-0310-9956-ffa450edef68
cache tries to save huge files (greater than RAM). Buckets bigger
than a tuneable threshold are split into smaller buckets before
being passed to mod_disk_cache, etc. PR 39380
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@467655 13f79535-47bb-0310-9956-ffa450edef68
that we kick off the filter stack with our cache_out filter being the
first in the chain. This make sense because we want to restore things
in the same manner as we saved them.
There may be filters before our cache_out filter, because
1. We call ap_set_content_type during cache_select. This causes
Content-Type specific filters to be added.
2. We call the insert_filter hook. This causes filters e.g. like
the ones set with SetOutputFilter to be added.
PR: 40090
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@425787 13f79535-47bb-0310-9956-ffa450edef68
in the case that no valid expire time was supplied with the document.
Submitted by: Brian Akins <brian.akins turner.com>
Reviewed by: Ruediger Pluem
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@369811 13f79535-47bb-0310-9956-ffa450edef68
by the type (AP_FTYPE_CONTENT_SET-1) from CACHE_OUT / CACHE_SAVE
(AP_FTYPE_CONTENT_SET+1). This ensures that subrequests to non local
resources do not get stuck in the middle of the road with the contents
only written to the temp file, because CACHE_OUT_SUBREQ / CACHE_SAVE_SUBREQ
are inserted *before* the SUBREQ_CORE filter in the filter chain.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@325960 13f79535-47bb-0310-9956-ffa450edef68
* Add r->uri to the debug messages in the quick handler; makes debugging
easier.
* Always reset headers_in for lookup's, some modules make subrequests
and then rewrite the url. Having a conditional request at this point
is not what they expect (nor reasonable for them to handle).
* Don't store a per-request config on lookups; for the same reason.
* Return DECLINED when in lookup mode and ap_meets_conditions() indicated
we have the content but don't know if it's fresh or not. We have no idea
whether the backend will have a 404, a 304 or any other kind of a
response - so we have to assume we cannot handle the request.
* remove the unused "url" argument from the cache_create_entity() function
* Whitespace/comment fixups in mod_cache.h
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@291588 13f79535-47bb-0310-9956-ffa450edef68
is valid, but cache is unwritable and headers cannot be updated.
Submitted by: Colm MacCarthaigh <colm stdlib.net>
Reviewed by: Justin Erenkrantz
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@231488 13f79535-47bb-0310-9956-ffa450edef68
Remove entities from the cache when re-validation receives a 404 or other
content-no-longer-present error.
Suggested by: Paul Querna, Justin Erenkrantz
Submitted by: Rudiger Plum <ruediger.pluem vodafone.com>
Reviewed by: Justin Erenkrantz
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@231487 13f79535-47bb-0310-9956-ffa450edef68
*) Remove the first set of Validation code. Use the main if structure to check for both 'Vary: *' and 'Cache-Control: no-store'.
*) Add logging of failures for a provider's store_body function.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@190033 13f79535-47bb-0310-9956-ffa450edef68
* modules/cache/mod_cache.c
(cache_url_handler): Add more debug output. Restore original request
headers when CACHE_SAVE filter isn't added to fix up after the request.
* modules/cache/cache_storage.c
(cache_select_url): Add more debug output.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@157162 13f79535-47bb-0310-9956-ffa450edef68
* modules/cache/cache_util.c
(ap_cache_check_freshness): On Cache-Control/Pragma no-cache force
revalidation by marking the resource as stale. Unless IgnoreCacheControl
is set ofcourse.
* modules/cache/mod_cache.c
(cache_url_handler): Remove Cache-Control/Pragma no-cache check and
accompagnying comment.
(cache_save_filter): Move FIXME comment to the correct location.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@156480 13f79535-47bb-0310-9956-ffa450edef68
* modules/cache/mod_cache.c
(cache_save_filter): Instead of unconditionally returning a 304 when
the original request was conditional and we issued a cache revalidating
request, handle the request as if it came in while our cache was
still valid.
* modules/cache/cache_storage.c
(cache_select_url): Strip off the conditional headers from the original
request, prior to adding our own for the purpose of revalidating our
cached response.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@156330 13f79535-47bb-0310-9956-ffa450edef68
* modules/cache/mod_cache.c: If we add a new Expires value, tell our client;
merge in headers properly (or better than before) so that we can update the
header fields on a revalidated but with updated header fields.
* modules/cache/mod_cache.h, modules/cache/cache_storage.c:
Add preserve_orig flag to ap_cache_accept_headers to allow updating of fields.
* modules/cache/mod_disk_cache.c: Load status value from disk.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@152973 13f79535-47bb-0310-9956-ffa450edef68
* modules/cache/mod_cache.c
(cache_save_filter): Load in the cached status and headers; send a flush
rather than an EOS when the client request is conditional.
* modules/cache/mod_cache.h: Export ap_cache_accept_headers.
* modules/cache/cache_storage.c: Rename accept_headers to
ap_cache_accept_headers.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@152680 13f79535-47bb-0310-9956-ffa450edef68