1
0
mirror of https://github.com/apache/httpd.git synced 2025-11-08 04:22:21 +03:00
Commit Graph

31 Commits

Author SHA1 Message Date
Ruediger Pluem
edfbb15c54 * Remove all filters that are before the cache_out filter. This ensures
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
2006-07-26 17:33:38 +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
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
395b632269 * Add CacheMinExpire directive to set the minimum time in seconds to cache a document
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
2006-01-17 15:12:23 +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
Ruediger Pluem
fd4bdc00ce * Create new filters CACHE_OUT_SUBREQ / CACHE_SAVE_SUBREQ which only differ
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
2005-10-17 18:59:52 +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
acf227a492 Enhance CacheEnable/CacheDisable to control caching on a per-protocol, per-host
and per-path basis. Makes Cache(En|Dis)able useful for forward proxy servers.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@239421 13f79535-47bb-0310-9956-ffa450edef68
2005-08-23 15:43:23 +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
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
Justin Erenkrantz
929eb45aaf Fix incorrectly served 304 responses when expired cache entity
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
2005-08-11 17:38:18 +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
Paul Querna
f4b3ad20aa Opps. Use the correct member of the structure.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@220038 13f79535-47bb-0310-9956-ffa450edef68
2005-07-21 11:40:30 +00:00
Paul Querna
f00dcbee2e Correctly restore the HTTP status from the cache handler.
Submitted by: Hansjoerg Pehofer


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@220036 13f79535-47bb-0310-9956-ffa450edef68
2005-07-21 11:37:07 +00:00
Paul Querna
7d836630f7 Now you can run mod_deflate before mod_cache, and cache it.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@219913 13f79535-47bb-0310-9956-ffa450edef68
2005-07-20 14:35:21 +00:00
Paul Querna
947ce2408d * cache_save_filter:
*) 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
2005-06-10 23:02:26 +00:00
Paul Querna
222d82ef5c * mod_cache.c: When 'Vary: *' is sent, do not cache, since revalidation is always required.
PR: 16125


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@180341 13f79535-47bb-0310-9956-ffa450edef68
2005-06-06 16:53:15 +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
f92cbd8dbc Improve caching a bit more...
* 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
2005-03-08 02:35:50 +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
Sander Striker
11344ad83a * modules/cache/mod_cache.c
(cache_url_handler): Tweak a few comments.

  (cache_save_filter): Add a FIXME for a corner case.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@156304 13f79535-47bb-0310-9956-ffa450edef68
2005-03-06 12:43:42 +00:00
Sander Striker
c4afdce3fd Some minimal tweaks to mod_cache.
* modules/cache/mod_mem_cache.c

  (store_headers): Remove unused variable.


* modules/cache/mod_cache.c

  (cache_save_filter): Slightly improve comment.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@153104 13f79535-47bb-0310-9956-ffa450edef68
2005-02-09 18:56:41 +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
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
268fba842f * modules/cache/mod_cache.c: One more try at proper handling of revalidated
responses.

...All together now, we hate uninitialized variables...


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@151816 13f79535-47bb-0310-9956-ffa450edef68
2005-02-08 02:03:47 +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
Sander Striker
fcb4674f0d Error out on configurations where the cache provider starts with a '/'.
Saves certain people a bit of time figuring out why their caching
doesn't work...

* modules/cache/mod_cache.c

  (add_cache_enable): Throw an error when a provider starting with
   a '/' is encountered.  The user probably switched arguments.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@151232 13f79535-47bb-0310-9956-ffa450edef68
2005-02-03 21:15:36 +00:00
Justin Erenkrantz
4743f301f2 Add CacheStorePrivate, CacheStoreNoStore, and clarify CacheIgnoreCacheControl.
* docs/manual/mod/mod_cache.xml: Update documentation for
  CacheIgnoreCacheControl and add documentation for two new directives.
* modules/cache/mod_cache.c
  (cache_url_handler): Honor 'Cache-Control: no-cache' request header.
  (cache_save_filter): Only honor no-store or private when their respective
                       directives are Off (which is the default).
  rest of file: add in standard configuration syntax stuff...
* modules/cache/mod_cache.h: Minor formatting tweak and add new fields.

Suggested by: Pier Fumagalli


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@149492 13f79535-47bb-0310-9956-ffa450edef68
2005-02-02 07:10:20 +00:00
Justin Erenkrantz
45fdd72155 mod_cache: Remove unimplemented CacheForceCompletion directive.
* modules/cache/mod_cache.h: Remove DEFAULT_CACHE_COMPLETION #define and
  complete-related vars.
* modules/cache/mod_cache.c: Ditto.
* modules/cache/mod_disk_cache.c: Clarify error message; remove unused
  complete var (unrelated to CacheForceCompletion removal).
* docs/manual/mod/mod_cache.xml.ja, docs/manual/mod/mod_cache.xml.ko,
  docs/manual/mod/mod_cache.xml: Remove references to CacheForceCompletion.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@125573 13f79535-47bb-0310-9956-ffa450edef68
2005-01-19 00:19:58 +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