1
0
mirror of https://github.com/apache/httpd.git synced 2026-10-25 10:59:28 +03:00
Commit Graph

41 Commits

Author SHA1 Message Date
Jim Jagielski
8cffdcdc51 Merge r729316, r729317 from trunk:
look for 'no-cache' in subprocess_env to prevent the saving
of an otherwise cacheable response.


document no-cache envvar

Submitted by: covener
Reviewed/backported by: jim


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@733762 13f79535-47bb-0310-9956-ffa450edef68
2009-01-12 14:07:10 +00:00
Paul J. Reder
f2fe9e4e22 Committing the following that was voted in:
When an expires or cache-control header are sent, the RFC does allow us to cache normally non-cacheable response statuses.
Submitted by: Alex Polvi <alex polvi.net>



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@727599 13f79535-47bb-0310-9956-ffa450edef68
2008-12-18 00:25:16 +00:00
Jim Jagielski
e6ce7d79ba Merge r636386, r636653 from trunk:
* Restore the original request headers if the cached resource was stale, as they
  may be needed by further output filters like the byterange filter to make the
  correct decisions.

PR: 44579


* 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

Submitted by: rpluem
Reviewed by: jim


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@660584 13f79535-47bb-0310-9956-ffa450edef68
2008-05-27 16:23:12 +00:00
Jim Jagielski
9d4346add1 Merge r539621 from trunk:
mod_cache: Do not set Date or Expires when they are missing from the original
response or are invalid.

Submitted by: jerenkrantz
Reviewed by: jim


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@553600 13f79535-47bb-0310-9956-ffa450edef68
2007-07-05 18:23:20 +00:00
Jim Jagielski
3676582ef4 Merge r539620 from trunk:
mod_cache: Correctly handle HEAD requests on expired cache content.  PR 41230.

* 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

Submitted by: jerenkrantz
Reviewed by: jim


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@553596 13f79535-47bb-0310-9956-ffa450edef68
2007-07-05 18:22:01 +00:00
Jim Jagielski
297c7af35f Backport:
* mod_cache: Let Cache-Control max-age set the expiration date. 
        Trunk version of patch:
         http://svn.apache.org/viewvc?view=rev&revision=539063
        2.2.x version of patch:
         http://people.apache.org/~jerenkrantz/max-age-expire-2.2.x.patch
         (No ->minex in 2.2.x)
        +1: jerenkrantz, fielding, striker



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@539430 13f79535-47bb-0310-9956-ffa450edef68
2007-05-18 12:41:14 +00:00
Justin Erenkrantz
4f100a47d3 mod_cache: Allow caching of requests with query arguments when Cache-Control
max-age is explicitly specified.

(Backport of r538807)

Reviewed by: jerenkrantz, fielding, rpluem


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@539280 13f79535-47bb-0310-9956-ffa450edef68
2007-05-18 06:12:24 +00:00
Ruediger Pluem
3fd2406cd0 Merge r504183 from trunk:
* 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, jerenkrantz, jim


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@539111 13f79535-47bb-0310-9956-ffa450edef68
2007-05-17 20:57:17 +00:00
Ruediger Pluem
05b665bd8b Merge r425787 from trunk:
* 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

Submitted by: rpluem
Reviewed by: rpluem, wrowe, jerenkrantz


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@538868 13f79535-47bb-0310-9956-ffa450edef68
2007-05-17 10:55:15 +00:00
Ruediger Pluem
f51303a9e8 Merge r476625 from trunk:
* 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

Submitted by: rpluem
Reviewed by: rpluem, jim, sctemme


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@535903 13f79535-47bb-0310-9956-ffa450edef68
2007-05-07 15:32:57 +00:00
Jeff Trawick
b74ad8d4c5 merge from trunk:
*) mod_cache: Eliminate a bogus error in the log when a filter returns
     AP_FILTER_ERROR. [Niklas Edmundsson <nikke acc.umu.se>]

Reviewed by: minfrin, wrowe, trawick
  


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@483974 13f79535-47bb-0310-9956-ffa450edef68
2006-12-08 12:56:00 +00:00
Graham Leggett
8320100463 mod_cache: Don't cache requests with a expires date in the past;
otherwise mod_cache will always try to cache the URL. This bug
might lead to numerous rename() errors on win32 if the URL was
previously cached.

+1: minfrin, rpluem, jim


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@463496 13f79535-47bb-0310-9956-ffa450edef68
2006-10-12 23:03:17 +00:00
Roy T. Fielding
ae1748a99f update license header text
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@421103 13f79535-47bb-0310-9956-ffa450edef68
2006-07-12 03:38:44 +00:00
Paul Querna
786089eef9 Revert r395231 from the 2.2.x branch. This gets us back to the old place with regard to the copyright statements.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@396056 13f79535-47bb-0310-9956-ffa450edef68
2006-04-22 01:53:06 +00:00
Colm MacCarthaigh
8ffd8c554b Update the last year of copyright for the 2.2.x branch
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@395231 13f79535-47bb-0310-9956-ffa450edef68
2006-04-19 12:33:16 +00:00
Jim Jagielski
b3181bddae No functional change: remove trailing whitespace. This also means
that "blank" lines, which had consisted of just spaces
and/or tabs are now truly blank lines


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@332309 13f79535-47bb-0310-9956-ffa450edef68
2005-11-10 15:20:05 +00:00
Ruediger Pluem
351014fef8 Merge r325960 from trunk:
* 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/branches/2.2.x@328466 13f79535-47bb-0310-9956-ffa450edef68
2005-10-25 20:10:43 +00:00
Colm MacCarthaigh
5418c9a296 Merge r291588, r291672 and r291914 from trunk; make mod_dir and mod_cache
play nice together. 


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@292423 13f79535-47bb-0310-9956-ffa450edef68
2005-09-29 12:20:54 +00:00
Colm MacCarthaigh
bf61af9527 Backport r239420 and r239421 to the 2.2.x branch; Enhance
CacheEnable/CacheDisable to be of use to proxy servers.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@290133 13f79535-47bb-0310-9956-ffa450edef68
2005-09-19 12:10:34 +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