summaryrefslogtreecommitdiff
path: root/modules/cache
Commit message (Collapse)AuthorAgeFilesLines
* * If the mod_proxy backend connection broke in the middle of the response,Ruediger Pluem2005-12-181-1/+1
| | | | | | | | | | | | | | | | | | | | | then - Do not cache it. - Signal the client that something went wrong by closing the connection and not sending the last-chunk marker if the response was T-E chunked. server/core_filters.c : Close the connection to the client by setting c->keepalive to AP_CONN_CLOSE. modules/http/chunk_filter.c : Do not send last-chunk marker in the case the backend broke. modules/proxy/mod_proxy_http.c: Signal that the backend connection broke. modules/cache/mod_disk_cache.c: Respect r->no_cache for discarding the response Submitted by: Roy T. Fielding, Jim Jagielski, Ruediger Pluem Reviewed by: Roy T. Fielding, Jim Jagielski, Ruediger Pluem git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@357461 13f79535-47bb-0310-9956-ffa450edef68
* No functional change: remove "internal" tab spacing/formatting.Jim Jagielski2005-11-163-9/+9
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@345053 13f79535-47bb-0310-9956-ffa450edef68
* No functional Change: Removing trailing whitespace. This alsoJim Jagielski2005-11-107-172/+172
| | | | | | | | 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
* No functional change: simple detabbing of indented code.Jim Jagielski2005-11-103-32/+32
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@332305 13f79535-47bb-0310-9956-ffa450edef68
* fix memory leak. Reported by <christophe.jaillet@wanadoo.fr>Bill Stoddard2005-11-021-0/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@330380 13f79535-47bb-0310-9956-ffa450edef68
* * Create new filters CACHE_OUT_SUBREQ / CACHE_SAVE_SUBREQ which only differRuediger Pluem2005-10-171-11/+73
| | | | | | | | | | | 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
* Two minor whitespace cleanups. Syncs with the 2.2.x branch.Colm MacCarthaigh2005-10-031-2/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@293291 13f79535-47bb-0310-9956-ffa450edef68
* Fixes and cleanups for mod_cache;Colm MacCarthaigh2005-09-263-22/+49
| | | | | | | | | | | | | | | | | | | | | | | | * 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
* Doxygen fixup / cleanupIan Holsman2005-08-284-26/+39
| | | | | | | | | submited by: Neale Ranns neale ranns.org reviewed by: Ian Holsman git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@263931 13f79535-47bb-0310-9956-ffa450edef68
* Enhance CacheEnable/CacheDisable to control caching on a per-protocol, per-hostColm MacCarthaigh2005-08-233-22/+73
| | | | | | | | 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
* remove some unused variables and re-name cache_select_url() to simply Colm MacCarthaigh2005-08-234-9/+5
| | | | | | | | cache_select() git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@239420 13f79535-47bb-0310-9956-ffa450edef68
* Improve the cache hit/miss ratio by canonicalising the url key. hostname'sColm MacCarthaigh2005-08-231-4/+74
| | | | | | | | | 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
* Split mod_disk_cache.c into mod_disk_cache.c and mod_disk_cache.hAndreas Steinmetz2005-08-232-64/+96
| | | | | | | to allow inclusion of mod_disk_cache.h in htcacheclean.c. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@239406 13f79535-47bb-0310-9956-ffa450edef68
* Move the debuging log message about the removal of a url fromJustin Erenkrantz2005-08-122-5/+4
| | | | | | | | | | 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
* mod_disk_cache: Remove the directory path of the cached file as far as possibleJustin Erenkrantz2005-08-121-2/+49
| | | | | | | | | | | | | | | | (up to the cache root) to get rid of unused empty directories. * cache/mod_disk_cache.c (remove_url): Try to delete directories; also change two APR_ENOENT to APR_STATUS_IS_ENOENT. (Justin tweaked some comments.) Submitted by: Rudiger Plum <ruediger.pluem vodafone.com> Reviewed by: Justin Erenkrantz git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@232334 13f79535-47bb-0310-9956-ffa450edef68
* * modules/cache/cache_storage.c (cache_remove_url): Remove unusedJoe Orton2005-08-121-3/+0
| | | | | | | variables. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@232272 13f79535-47bb-0310-9956-ffa450edef68
* Fix incorrectly served 304 responses when expired cache entityJustin Erenkrantz2005-08-111-4/+37
| | | | | | | | | | 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
* mod_cache: Implement remove URL via a filter.Justin Erenkrantz2005-08-114-19/+101
| | | | | | | | | | | | 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
* Implement mod_disk_cache's remove_url.Justin Erenkrantz2005-08-111-2/+44
| | | | | | | | | | | (Minor tweaks and comment fixes by Justin.) 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@231486 13f79535-47bb-0310-9956-ffa450edef68
* mod_disk_cache: Retry file rename up to three times to ameliorate raceJustin Erenkrantz2005-08-101-3/+30
| | | | | | | | | | | | | condition with htcacheclean removing the directories underneath us. (Includes tweaks by Justin.) Suggested by: Graham Leggett Submitted by: Andreas Steinmetz <ast@domdv.de> Reviewed by: Justin Erenkrantz git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@231349 13f79535-47bb-0310-9956-ffa450edef68
* Opps. Use the correct member of the structure.Paul Querna2005-07-211-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@220038 13f79535-47bb-0310-9956-ffa450edef68
* Correctly restore the HTTP status from the cache handler.Paul Querna2005-07-211-0/+5
| | | | | | | Submitted by: Hansjoerg Pehofer git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@220036 13f79535-47bb-0310-9956-ffa450edef68
* Quick hack to store varied contents under the same path, making it Paul Querna2005-07-201-6/+28
| | | | | | | | | easier for admins to manage the cache. Still requires modifications to htcacheclean to work. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@219945 13f79535-47bb-0310-9956-ffa450edef68
* Now you can run mod_deflate before mod_cache, and cache it.Paul Querna2005-07-201-2/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@219913 13f79535-47bb-0310-9956-ffa450edef68
* caddr_t is quite non-portable, but a (void*) will do the trick.William A. Rowe Jr2005-06-171-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@191174 13f79535-47bb-0310-9956-ffa450edef68
* Fix up some type mismatches that are causing compiler errors in Metrowerks ↵Bradley Nicholes2005-06-152-3/+3
| | | | | | on NetWare git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@190819 13f79535-47bb-0310-9956-ffa450edef68
* - Remove unneeded cast.Paul Querna2005-06-141-1/+1
| | | | | | | Reported by: Garrett Rooney git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@190547 13f79535-47bb-0310-9956-ffa450edef68
* - Partial revert of revision 190535. Remove const from tempfile, since ↵Paul Querna2005-06-141-1/+1
| | | | | | apr_file_mktemp() requires it. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@190536 13f79535-47bb-0310-9956-ffa450edef68
* * cache/mod_disk_cache.c: Make most members of disk_cache_object into const ↵Paul Querna2005-06-142-15/+15
| | | | | | | | | | char*. This removes the need to cast the const out in several places. * cache/mod_cache.h: Make cache_object.key a const. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@190535 13f79535-47bb-0310-9956-ffa450edef68
* - Remove unused dirlevels and dirlength from the cache info structure.Paul Querna2005-06-141-4/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@190534 13f79535-47bb-0310-9956-ffa450edef68
* Based on feedback from dev@httpd, store Vary headers inside the '.header' file.Paul Querna2005-06-131-28/+292
| | | | | | | | | | | | | | These Vary headers are used to build a new hash for a URL, based on the client's headers. This allows mod_disk_cache to store many variations of one URI, where previously it would only store a single variant. htcacheclean needs to be updated to understand the new file format. I plan on updating htcacheclean in the next couple days. PR: 35211 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@190530 13f79535-47bb-0310-9956-ffa450edef68
* - link/unlink are not called directly, so we do not need this extra header.Paul Querna2005-06-111-4/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@190047 13f79535-47bb-0310-9956-ffa450edef68
* - Use apr_file_mktemp() and rename the header data file to its final ↵Paul Querna2005-06-111-11/+24
| | | | | | location, instead of opening it and then writing it out as we go. Should prevent race conditions on busy servers. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@190043 13f79535-47bb-0310-9956-ffa450edef68
* * cache_save_filter: Paul Querna2005-06-101-15/+11
| | | | | | | | *) 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
* Rename generate_name to ap_cache_generate_nameBradley Nicholes2005-06-081-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@189661 13f79535-47bb-0310-9956-ffa450edef68
* * mod_cache.c: When 'Vary: *' is sent, do not cache, since revalidation is ↵Paul Querna2005-06-061-1/+3
| | | | | | | | | always required. PR: 16125 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@180341 13f79535-47bb-0310-9956-ffa450edef68
* 'generate_name' is too generic to be in the public symbols. Rename it to ↵Paul Querna2005-06-033-9/+9
| | | | | | ap_cache_generate_name. No functional changes. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@179877 13f79535-47bb-0310-9956-ffa450edef68
* Reintroduce stack frame construction with /Oy- (removal was implied by /O2).William A. Rowe Jr2005-05-154-4/+4
| | | | | | | | | This makes binaries far easier to debug, during operation and for post-crash .dmp analysis. Do not alter /Gs optimizations per brane. Reviewed by: stoddard, brane git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@170253 13f79535-47bb-0310-9956-ffa450edef68
* Another mod_cache fixlet.Sander Striker2005-03-112-0/+13
| | | | | | | | | | | | | | | * 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
* Make IgnoreCacheControl do what it implies when it comes to requests andSander Striker2005-03-081-6/+8
| | | | | | | | | | | | freshness checks. * modules/cache/cache_util.c (ap_cache_check_freshness): Ignore CacheControl: max-age and min-fresh if IgnoreCacheControl is set. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@156567 13f79535-47bb-0310-9956-ffa450edef68
* Improve caching a bit more...Sander Striker2005-03-082-39/+32
| | | | | | | | | | | | | | | | | | | * 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
* Remove an unused function.Sander Striker2005-03-083-13/+0
| | | | | | | | | | | * cache_util.c * mod_cache.imp * mod_cache.h (ap_cache_request_is_conditional): Removed. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@156471 13f79535-47bb-0310-9956-ffa450edef68
* * modules/cache/cache_util.c (ap_cache_check_freshness): Use r->headers_in notJustin Erenkrantz2005-03-071-1/+4
| | | | | | | | | the stored headers for the Cache-Control check. Pointed out by: Sander Striker git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@156401 13f79535-47bb-0310-9956-ffa450edef68
* More mod_cache tweakage...Sander Striker2005-03-062-14/+27
| | | | | | | | | | | | | | | | | | | * 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
* Tracked down by Justin Erenkrantz.Sander Striker2005-03-061-67/+61
| | | | | | | | | * modules/cache/mod_disk_cache.c (store_headers): Stop second guessing mod_cache and just store the headers in a new file (overwriting the old). git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@156306 13f79535-47bb-0310-9956-ffa450edef68
* * modules/cache/mod_cache.cSander Striker2005-03-061-2/+6
| | | | | | | | | (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
* * modules/cache/mod_disk_cache.c (store_body): Fix format stringJoe Orton2005-02-113-6/+5
| | | | | | | | | | | | | 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
* Some minimal tweaks to mod_cache.Sander Striker2005-02-092-3/+4
| | | | | | | | | | | | | | * 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
* More work to properly handle revalidated responses correctly.Justin Erenkrantz2005-02-094-19/+64
| | | | | | | | | | | | * 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
* More mod_cache tweakage.Sander Striker2005-02-081-5/+7
| | | | | | | | | * 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