1
0
mirror of https://github.com/apache/httpd.git synced 2025-11-06 16:49:32 +03:00
Commit Graph

31 Commits

Author SHA1 Message Date
Ruediger Pluem
023b0a4f61 * Correctly detect if CacheIgnoreURLSessionIdentifiers is set.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@778439 13f79535-47bb-0310-9956-ffa450edef68
2009-05-25 15:24:47 +00:00
Ruediger Pluem
d2700640cd * Add CacheIgnoreURLSessionIdentifiers directive to ignore
defined session identifiers encoded in the URL when caching.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@777042 13f79535-47bb-0310-9956-ffa450edef68
2009-05-21 10:42:54 +00:00
Paul Querna
a324a1d72f Remove all references to CORE_PRIVATE.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@645455 13f79535-47bb-0310-9956-ffa450edef68
2008-04-07 10:45:43 +00:00
Ruediger Pluem
1fb72c6dd2 * Do not do Range requests if we use our own conditionals for validating
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
2008-03-13 07:28:40 +00:00
Ruediger Pluem
477744b538 * Save the key we generate during our first run of cache_generate_key_default
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
2007-02-12 20:29:04 +00:00
Ruediger Pluem
8a7fb4574c * Add CacheIgnoreQueryString directive to cache requests with a query string
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
2007-02-06 15:55:50 +00:00
Ruediger Pluem
7410019c69 * Remove expired content from cache that cannot be revalidated.
PR: 30370


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@481886 13f79535-47bb-0310-9956-ffa450edef68
2006-12-03 20:51:13 +00:00
Ruediger Pluem
e6a844c031 * Use the query string stored in r->parsed_uri.query instead of r->args
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
2006-11-18 22:17:33 +00:00
Roy T. Fielding
de659cbed0 update license header text
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@420983 13f79535-47bb-0310-9956-ffa450edef68
2006-07-11 20:33:53 +00:00
Ruediger Pluem
6b175e597f * Keep the Content-Type for successfully revalidated
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
2006-05-30 20:48:09 +00:00
Ruediger Pluem
db02633be5 * Cleanup the code by replacing some inline code to lower-case a string with
ap_str_tolower.

Proposed by: Joe Orton


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@408729 13f79535-47bb-0310-9956-ffa450edef68
2006-05-22 19:05:09 +00:00
Ruediger Pluem
6ce4498198 * Fix const compiler warning introduced by r407357.
Noticed by: Joe Orton


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@408154 13f79535-47bb-0310-9956-ffa450edef68
2006-05-21 10:29:09 +00:00
Ruediger Pluem
a3d86dbf15 * Handle the cases "no proxy request" and "reverse proxy request" in the same
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
2006-05-17 19:16:43 +00:00
Colm MacCarthaigh
dd95d7c37c Update the copyright year in all .c, .h and .xml files
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@395228 13f79535-47bb-0310-9956-ffa450edef68
2006-04-19 12:11:27 +00:00
Ruediger Pluem
bb2af228cd * Fix PR38017 by handling the selection of the hostname in the same way for
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
2006-01-10 21:34:11 +00:00
Jim Jagielski
5061d9fa92 No functional Change: Removing trailing whitespace. This also
means that "blank" lines consisting of just spaces or
tabs are now really blank lines


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@332306 13f79535-47bb-0310-9956-ffa450edef68
2005-11-10 15:11:44 +00:00
Colm MacCarthaigh
6eeba097be Fixes and cleanups for mod_cache;
* 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
2005-09-26 09:21:45 +00:00
Colm MacCarthaigh
c6700d7708 remove some unused variables and re-name cache_select_url() to simply
cache_select()



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@239420 13f79535-47bb-0310-9956-ffa450edef68
2005-08-23 15:25:08 +00:00
Colm MacCarthaigh
2e702882bd Improve the cache hit/miss ratio by canonicalising the url key. hostname's
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
2005-08-23 13:50:47 +00:00
Justin Erenkrantz
03a775765f Move the debuging log message about the removal of a url from
cache_remove_url_filter to cache_remove_url.

Submitted by: Rudiger Plum <ruediger.pluem vodafone.com>
Reviewed by: Justin Erenkrantz


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@232335 13f79535-47bb-0310-9956-ffa450edef68
2005-08-12 16:57:13 +00:00
Joe Orton
5d7d8f280f * modules/cache/cache_storage.c (cache_remove_url): Remove unused
variables.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@232272 13f79535-47bb-0310-9956-ffa450edef68
2005-08-12 11:32:55 +00:00
Justin Erenkrantz
d757d824b8 mod_cache: Implement remove URL via a filter.
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
2005-08-11 17:35:48 +00:00
Sander Striker
97851ed800 Another mod_cache fixlet.
* 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
2005-03-11 21:39:45 +00:00
Sander Striker
c70cb4ba14 More mod_cache tweakage...
* 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
2005-03-06 18:57:22 +00:00
Joe Orton
519b48fce1 * modules/cache/mod_disk_cache.c (store_body): Fix format string
warnings; print integers using _FMT strings.

* modules/cache/cache_util.c (ap_cache_check_freshness): Remove unused
variable.

* modules/cache/cache_storage.c (cache_select_url): Remove unused
variable.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@153385 13f79535-47bb-0310-9956-ffa450edef68
2005-02-11 12:16:06 +00:00
Justin Erenkrantz
441086ecfd More work to properly handle revalidated responses correctly.
* 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
2005-02-09 01:38:59 +00:00
Sander Striker
876ee19013 More mod_cache tweakage.
* modules/cache/cache_storage.c

  (cache_select_url): Add If-Modified-Since regardless of having
    an ETag or not.  See: RFC2616, 14.26.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@152948 13f79535-47bb-0310-9956-ffa450edef68
2005-02-08 22:23:31 +00:00
Justin Erenkrantz
74a70d429a Return the proper status and headers when serving a revalidated response.
* 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
2005-02-08 17:56:38 +00:00
Justin Erenkrantz
1d4c6d1c6d Cleanup structures in mod_cache and friends to remove unused or unnecessary
fields.  Also resolves a number of latent bugs due to the wrong fields being
accessed.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@152679 13f79535-47bb-0310-9956-ffa450edef68
2005-02-08 17:39:56 +00:00
Justin Erenkrantz
905cdf9f0b Update copyright year to 2005 and standardize on current copyright owner line.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@151408 13f79535-47bb-0310-9956-ffa450edef68
2005-02-04 20:28:49 +00:00
Justin Erenkrantz
63dd4623e1 At long last, promote mod_cache and friends out of experimental/.
Also, take quick pass through docs files to remove experimental label for them.

Reviewed by: Paul Querna, Bill Stoddard, Justin Erenkrantz


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@106737 13f79535-47bb-0310-9956-ffa450edef68
2004-11-27 19:06:48 +00:00