in the process, as this will happen later anyway as necessary. We may want
to serve the stale entry should the backend not be available.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1023398 13f79535-47bb-0310-9956-ffa450edef68
to the next provider, not return DECLINED too early, except for the
revalidate case, where returning DECLINED is correct behaviour.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1023392 13f79535-47bb-0310-9956-ffa450edef68
using the CacheKeyBaseURL directive, so that the cache key can be
calculated from the endpoint URL instead of the server URL.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1003963 13f79535-47bb-0310-9956-ffa450edef68
to return cached content at all, and respect a "Cache-Control:
no-cache" header from a client. Previously, "no-cache" would
behave like "max-age=0".
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@992625 13f79535-47bb-0310-9956-ffa450edef68
If a specially crafted request was sent, it is possible to crash mod_dav,
mod_cache or mod_session, as they accessed a field that is set to NULL
by the URI parser, assuming that it always put in a valid string.
PR: 49246
Submitted by: Mark Drayton
Patch by: Jeff Trawick
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@966348 13f79535-47bb-0310-9956-ffa450edef68
against the querystring instead of a partial match.
PR: 48401
Submitted by: Dodou Wang <wangdong.08 gmail.com>
Reviewed by: rpluem
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@892289 13f79535-47bb-0310-9956-ffa450edef68
a cache entity: If we get 304 the Range does not matter and otherwise the
entity changed and we want to have the complete entity.
PR: 44579
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@636653 13f79535-47bb-0310-9956-ffa450edef68
on each request in the request_config. During consecutive runs of
cache_generate_key_default during processing the request we restore it
from there as we might not be able to generate the same key again as
the ingredients used to compose the key might have changed and we constantly
must use a key that could be generated during the quick handler phase.
PR: 41475
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@506621 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
cached objects, by unsetting possible Content-Type headers in
r->headers_out and r->err_headers_out as they may be different to what
we have received from the cache.
Actually they are not needed as r->content_type set by
ap_set_content_type a few lines above will be used in the store_headers
functions of the storage providers as a fallback and the HTTP_HEADER filter
does overwrite the Content-Type header with r->content_type anyway.
PR: 39647
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@410370 13f79535-47bb-0310-9956-ffa450edef68
manner, when setting scheme and port_str. This is needed because if a cached
entry is looked up by mod_cache's quick handler r->proxyreq
is still unset in the reverse proxy case as it only gets set in the
translate name hook (either by ProxyPass or mod_rewrite) which is run
after the quick handler hook. This is different to the forward proxy
case where it gets set before the quick handler is run (in the
post_read_request hook).
If a cache entry is created by the CACHE_SAVE filter we always have
r->proxyreq set correctly.
Also set scheme to ap_http_scheme(r) instead of "http" to handle SSL
correctly.
PR: 39593
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@407357 13f79535-47bb-0310-9956-ffa450edef68
non proxied and reverse proxied requests.
We need to handle both cases in the same manner as for the reverse proxy
case we have the following situation:
If a cached entry is looked up by mod_cache's quick handler r->proxyreq
is still unset in the reverse proxy case as it only gets set in the
translate name hook (either by ProxyPass or mod_rewrite) which is run
after the quick handler hook. This is different to the forward proxy
case where it gets set before the quick handler is run (in the
post_read_request hook).
If a cache entry is created by the CACHE_SAVE filter we always have
r->proxyreq set correctly.
So we must ensure that in the reverse proxy case we use the same code
path and using the canonical name seems to be the right thing to do
in the reverse proxy case.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@367798 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
are matched case-insensitively, port-based vhosts are catered for and the
scheme included for future multi-scheme caching compatibility.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@239407 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
* 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/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