1
0
mirror of https://github.com/apache/httpd.git synced 2026-01-26 19:01:35 +03:00
Commit Graph

39 Commits

Author SHA1 Message Date
Cliff Woolley
3e2ce19baf BUCKET FREELISTS
Add an allocator-passing mechanism throughout the bucket brigades API.

From Apache's standpoint, the apr_bucket_alloc_t* used throughout a given
connection is stored in the conn_rec by the create_connection hook.  That
means it's the MPM's job to optimize recycling of apr_bucket_alloc_t's --
the MPM must ensure that no two threads can ever use the same one at the
same time, for instance.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94304 13f79535-47bb-0310-9956-ffa450edef68
2002-03-29 08:17:26 +00:00
Bill Stoddard
7da34b011d Add a new parameter to the quick_handler hook to instruct
quick handlers to optionally do a lookup rather than actually
serve content. This is the first of several changes required fix
several problems with how quick handlers work with subrequests.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94240 13f79535-47bb-0310-9956-ffa450edef68
2002-03-27 22:42:16 +00:00
Bill Stoddard
ca9511a577 Ensure CACHE_OUT gets installed in front of SUBREQ_CORE on subrequsts.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94236 13f79535-47bb-0310-9956-ffa450edef68
2002-03-27 21:20:37 +00:00
Bill Stoddard
0a62271096 Decline urls ending with /
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93920 13f79535-47bb-0310-9956-ffa450edef68
2002-03-13 21:47:03 +00:00
Roy T. Fielding
845cbfd508 Update our copyright for this year.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93918 13f79535-47bb-0310-9956-ffa450edef68
2002-03-13 20:48:07 +00:00
Graham Leggett
de8942eb9f Scrap CacheMaxExpireMin and CacheDefaultExpireMin. Change
CacheMaxExpire and CacheDefaultExpire to use seconds rather than
hours.
PR:
Obtained from:
Submitted by:
Reviewed by:	Bill Stoddard


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93810 13f79535-47bb-0310-9956-ffa450edef68
2002-03-09 06:59:28 +00:00
Bill Stoddard
495a3a7c77 Bail out gracefully if any part od cache load fails. Still need to handle bailing
out of serving out of the cache fails.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93778 13f79535-47bb-0310-9956-ffa450edef68
2002-03-07 22:24:56 +00:00
Justin Erenkrantz
3058b601ff As hinted on dev@httpd, change filter naming schemes to match our
expectations of their usage.

The reason that we should make this change now is that we have changed
the implied meaning of AP_FTYPE_HTTP_HEADER - some users of this should
be PROTOCOL while others should be CONTENT_SET.  In order to clarify it,
toss all of the bogus names and force the filter writers to make sure
they understand what they are doing.

CONTENT_SET is new (horrible name - change if you have better idea), but
it indicates that it should run between RESOURCE and PROTOCOL.
mod_deflate is the ideal CONTENT_SET filter.

The changed type names are:
CONTENT is now RESOURCE.
HTTP_HEADER is now PROTOCOL.  However, most filters that used HTTP_HEADER
may want CONTENT_SET.  (Only things like POP and HTTP belong as PROTOCOL.)

MMN bump since all filters need to be recompiled due to filter reordering.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93756 13f79535-47bb-0310-9956-ffa450edef68
2002-03-07 09:27:17 +00:00
Bill Stoddard
564612dcb8 Bail on computing the amount of bytes in a brigade if any of the buckets
have indeterminate length (e.g., a pipe bucket). Passing an invalid length
into mod_mem_cache can cause it to overflow its cache buffer.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93698 13f79535-47bb-0310-9956-ffa450edef68
2002-03-04 17:13:08 +00:00
Bill Stoddard
7a7af0705c Fix problem with expiry date being set in the past.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93552 13f79535-47bb-0310-9956-ffa450edef68
2002-02-23 19:44:31 +00:00
Bill Stoddard
9004838827 Fix problem where expiry time was being set in the past when the cache was
loaded.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93551 13f79535-47bb-0310-9956-ffa450edef68
2002-02-23 19:31:02 +00:00
Bill Stoddard
bf1ca65eff Move mod_disk_cache specific fields out of the cache_obj and into the
disk_cache_object_t.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93390 13f79535-47bb-0310-9956-ffa450edef68
2002-02-13 15:25:39 +00:00
Ian Holsman
398690311d add another log message showing when we server a cached file (as info not debug)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93344 13f79535-47bb-0310-9956-ffa450edef68
2002-02-08 19:58:26 +00:00
Bill Stoddard
f1041c39f5 Add the return type to the function definition.
Submitted by: Joe Norton


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93245 13f79535-47bb-0310-9956-ffa450edef68
2002-02-05 02:47:29 +00:00
Ian Holsman
15a4252225 add a optional function ap_cache_generate_key
which allows a 3rd party module to generate the key name based
on the request_rec.

the idea here is for it to also be able to mess with expiry times
and cachability

add another option.. CacheIgnoreCacheControl. this ignores a 'incoming request's
attempts to get a fresh copy. Mainly I see this as being usefull in r-proxy's


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93242 13f79535-47bb-0310-9956-ffa450edef68
2002-02-05 00:15:42 +00:00
Bill Stoddard
1d5a371a5c Support files for mod_disk_cache. Some tweaks to arguments on various hook
calls. Still lots of cleanup work to do here...


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93196 13f79535-47bb-0310-9956-ffa450edef68
2002-02-03 06:24:55 +00:00
Bill Stoddard
2017c84578 Remove the CACHE_IN filter is we are not doing caching
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93182 13f79535-47bb-0310-9956-ffa450edef68
2002-02-02 16:40:52 +00:00
Bill Stoddard
e4cd22b01e Add a few more checks to determine a response should be cached.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93181 13f79535-47bb-0310-9956-ffa450edef68
2002-02-02 16:20:33 +00:00
Ian Holsman
465e16b71b change filter's/handlers to static.
changed a directive to a flag (which is what it was)
Submitted by:	 Jeff Trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93118 13f79535-47bb-0310-9956-ffa450edef68
2002-01-30 18:53:33 +00:00
Ian Holsman
3380361860 out damn warnings out
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93115 13f79535-47bb-0310-9956-ffa450edef68
2002-01-30 18:05:26 +00:00
Ian Holsman
eca473b0c0 I haven't created the optional function to specify the cache_key yet,
That will come after this patch.

ok.. brief summary of whats changed

* new Optional Directives
	* CacheMemEntrySize -- max size of a individual entry in memory
		cache
	* CacheIgnoreNoLastMod - so we can cache mod-included files

* it tries to figure out the size of the request based on buckets if the
	content-length header isn't set

* mem_cache now caches the subprocess_env & notes tables
* the CACHE_IN/OUT/CONDITIONAL run at FTYPE_CONTENT+1, so that
	all other content filters run BEFORE the cache in.

note: the code is still experimental, and we need a bit more work
mainly...
* garbage collection
* cache stats/reporting
* manual removal of a key.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93030 13f79535-47bb-0310-9956-ffa450edef68
2002-01-25 20:09:33 +00:00
Ian Holsman
59c3015f6b cache now can cache things for minutes.
add remove_entity function to type on mem_cache (so we can remove items from the cache)
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92734 13f79535-47bb-0310-9956-ffa450edef68
2002-01-04 17:58:36 +00:00
Bill Stoddard
7fd63fb064 Maintain info structure in mod_mem_cache. This fixes bug where the content
type was lost when content was put in the cache.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91005 13f79535-47bb-0310-9956-ffa450edef68
2001-09-11 17:41:05 +00:00
Jeff Trawick
1c4d2044c6 add a note about an uninitialized variable
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91002 13f79535-47bb-0310-9956-ffa450edef68
2001-09-11 11:25:28 +00:00
Bill Stoddard
dbfc30e197 Introduce the notion of a multi part cache object. Part of the cache_object
is common across any cache implementation, the other part is private to
the particular implementation (eg, mem_cache_object_t/mod_mem_cache).
Use a cache_handle_t allocated out of the request pool to hold references
to the callback functions and common cache object.

The cache_handle_t contains implementation specific callback functions and
a reference to a common cache_object_t.  The cache_object_t contains
a reference to an implementation specific cache object extension (mem_cache_object_t
for example).

All this simplifies managing the callback function pointers (don't want to
save them in each cache entry) and collections of cache_object_t keyed
to a single url.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90994 13f79535-47bb-0310-9956-ffa450edef68
2001-09-10 18:09:56 +00:00
Jeff Trawick
1eaa7de4cb attempt to fix some issues in mod_cache found by gcc
(use of rv and date before setting them)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90953 13f79535-47bb-0310-9956-ffa450edef68
2001-09-07 13:54:25 +00:00
Bill Stoddard
b2d20857c6 Pass headers on read/write header calls. Update mod_mem_cache to cache headers.
So much to do so little time ...


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90947 13f79535-47bb-0310-9956-ffa450edef68
2001-09-07 02:56:11 +00:00
Bill Stoddard
cec5937a28 Make CACHE_IN and CACHE_CONDITIONAL AP_FTYPE_CONTENT filters. Comtemplating
making a new filter type, AP_FTYPE_CACHE.  We need to run CACHE_IN immediately
after the handlers are done and before we run the content through any filters.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90794 13f79535-47bb-0310-9956-ffa450edef68
2001-08-30 02:55:08 +00:00
Bill Stoddard
0e224facaa Fix seg fault when requesting a page that returns a 'don't cache' header.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90642 13f79535-47bb-0310-9956-ffa450edef68
2001-08-24 17:21:39 +00:00
Bill Stoddard
a7ba1a6bc6 Uninstall the filter if the caching layer declines the cache request.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90633 13f79535-47bb-0310-9956-ffa450edef68
2001-08-24 16:33:10 +00:00
Jeff Trawick
18a65b5246 mod_cache cleanup:
change the module variable from tcache_module to cache_module

clear up various gcc warnings

don't segfault when the silly user (me) configures CACHE_OUT
manually


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90579 13f79535-47bb-0310-9956-ffa450edef68
2001-08-23 19:46:55 +00:00
Bill Stoddard
6fbc62e0c7 Replace apr_uri_components with apr_uri_t
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90560 13f79535-47bb-0310-9956-ffa450edef68
2001-08-23 18:27:21 +00:00
Bill Stoddard
c1bce71562 Experimental cache based on Graham Leggett's layered cache design. mod_cache
implements a quick handler, and three filters. The filters are
CACHE_IN for loading the cache, CACHE_OUT for serving content out of the cache
and CACHE_CONDITIONAL, which handles stale entries in the cache.

mod_cache implements code that makes RFC compliant caching decisions. It
interfaces with the actual storage mechanism via calls to functions defined in
cache_storage.c.  This commit includes a simple in memory (malloc'ed memory)
cache implementation that demonstrates autoloading and serving files
keyed on URL.

This is not even close to production ready. You have been warned :-)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90549 13f79535-47bb-0310-9956-ffa450edef68
2001-08-23 14:15:00 +00:00
Victor J. Orlikowski
8ed4d7898a Ordering changes, for detection's sake.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89315 13f79535-47bb-0310-9956-ffa450edef68
2001-06-09 04:21:27 +00:00
Jeff Trawick
2e3a6beb87 get mod_cache to at least compile
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88893 13f79535-47bb-0310-9956-ffa450edef68
2001-04-19 12:07:50 +00:00
Roy T. Fielding
381f88d56a Update copyright to 2001
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88184 13f79535-47bb-0310-9956-ffa450edef68
2001-02-16 04:26:53 +00:00
William A. Rowe Jr
59bbd68bec The big change. This is part 3 of the apr-util symbols rename, please
see the first commit of srclib/apr-util/include (cvs apr-util/include)
  for the quick glance at symbols changed.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87731 13f79535-47bb-0310-9956-ffa450edef68
2001-01-19 07:04:36 +00:00
William A. Rowe Jr
40655f8641 Provide apr_pool_t arg to register_hooks, since anything they do in that
step -must- be done with a pool that will not outlive the cmd pool, from
  which they may have been dynamically loaded.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87697 13f79535-47bb-0310-9956-ffa450edef68
2001-01-17 15:52:12 +00:00
Ryan Bloom
bb227c01e1 First pass at a set of caching filters and handlers. This implements a
working disk cache.  There are a lot of improvements to be made to this,
but this is a pretty good start to a dynamic cache.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86995 13f79535-47bb-0310-9956-ffa450edef68
2000-11-17 18:33:33 +00:00