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

252 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
Jeff Trawick
8f04ed6a4d signature of quick_handler hook changed
(mod_example's quick_handler hook doesn't have to do anything
with the new parameter)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94262 13f79535-47bb-0310-9956-ffa450edef68
2002-03-28 11:17:59 +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
6f05957b1a Update the MSVC++ project files. The debug databases were conficting between
the different cache projects.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94229 13f79535-47bb-0310-9956-ffa450edef68
2002-03-27 19:06:52 +00:00
Jeff Trawick
00afbe274a get the prototype for ap_set_content_type()
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94125 13f79535-47bb-0310-9956-ffa450edef68
2002-03-22 11:45:26 +00:00
Bill Stoddard
8315a9d245 Use the accessor to set r->content_type
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94114 13f79535-47bb-0310-9956-ffa450edef68
2002-03-22 02:48:00 +00:00
Bill Stoddard
d5c24720dc Commit 1 of 2 to:
1. rename ap_rset_content_type to ap_set_content_type
2. reverse the arguments on the call to aligh with ap_set_content_length


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94056 13f79535-47bb-0310-9956-ffa450edef68
2002-03-20 17:41:55 +00:00
Bill Stoddard
470edb9dd8 First commit to introduce accessor function to set r->content_type..
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94027 13f79535-47bb-0310-9956-ffa450edef68
2002-03-20 01:58:47 +00:00
Bill Stoddard
8ef1d7f01e Fix check for APR feature
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93996 13f79535-47bb-0310-9956-ffa450edef68
2002-03-18 15:45:46 +00:00
Cliff Woolley
55d4960f3a Get mod_mem_cache to compile cleanly again on linux, where apr_atomic_t
is a struct.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93995 13f79535-47bb-0310-9956-ffa450edef68
2002-03-18 06:37:32 +00:00
Cliff Woolley
1e54774af1 Hacks on top of hacks... UNIX needs unistd.h for the close() prototype
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93993 13f79535-47bb-0310-9956-ffa450edef68
2002-03-18 05:22:37 +00:00
Jeff Trawick
2df1a02f72 deal with the rename of kill_after_timeout to APR_KILL_AFTER_TIMEOUT
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93940 13f79535-47bb-0310-9956-ffa450edef68
2002-03-14 22:19:14 +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
Bill Stoddard
ca79431488 Remove incomplete cache_objects from the cache if the cache update fails. This
fixes a bug where the cache was referencing freed cache_objects.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93903 13f79535-47bb-0310-9956-ffa450edef68
2002-03-13 13:56:20 +00:00
Bill Stoddard
3b5e58ba6e Enable mod_mem_cache to use apr_atomic operators in managing cache_object
reference counting. Enabled by default via the USE_ATOMICS preproc directive.
This compiles cleanly and serves pages on Windows. Not compiled or tested on
any other OS.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93889 13f79535-47bb-0310-9956-ffa450edef68
2002-03-13 03:59:21 +00:00
Bill Stoddard
ee42c383b1 A bit more cleanup
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93888 13f79535-47bb-0310-9956-ffa450edef68
2002-03-13 03:00:22 +00:00
Bill Stoddard
1eddc44767 cleanup some code paths
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93880 13f79535-47bb-0310-9956-ffa450edef68
2002-03-12 22:26:07 +00:00
Bill Stoddard
fcc65d9d3b Remove some deprecated comments. Delete some unused variables.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93876 13f79535-47bb-0310-9956-ffa450edef68
2002-03-12 22:05:21 +00:00
Bill Stoddard
9534321221 Reference the cache_object directly rather than via the handle
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93850 13f79535-47bb-0310-9956-ffa450edef68
2002-03-12 03:00:35 +00:00
Bill Stoddard
1172ca6458 Move refcount and cleanup to the primary cache object (these fields can now
be used implementations other than mod_mem_cache)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93849 13f79535-47bb-0310-9956-ffa450edef68
2002-03-12 02:54:25 +00:00
Ben Laurie
bc9f45eadc Be a better example.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93832 13f79535-47bb-0310-9956-ffa450edef68
2002-03-10 20:49:29 +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
e0530c48a6 No this is not a pretty site... close the cached file descriptor. There is no clean
way to get this back into an apr_file_t since we are in the request pool cleanup.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93806 13f79535-47bb-0310-9956-ffa450edef68
2002-03-08 21:59:25 +00:00
Bill Stoddard
aca5bdee8e Add file handle caching to mod_mem_cache. This is still experimental and
is enabled by the #define CACHE_FD, which is off by default.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93789 13f79535-47bb-0310-9956-ffa450edef68
2002-03-08 04:25:30 +00:00
Bill Stoddard
33d246241a Deconstify...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93782 13f79535-47bb-0310-9956-ffa450edef68
2002-03-07 22:48:37 +00:00
Bill Stoddard
11cd8210d8 Deconstify these fields...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93781 13f79535-47bb-0310-9956-ffa450edef68
2002-03-07 22:47:15 +00:00
Bill Stoddard
228d7cd938 Alignment tweaks. No function change.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93779 13f79535-47bb-0310-9956-ffa450edef68
2002-03-07 22:26:33 +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
Bill Stoddard
5e0e6c4336 Change the return type on read_headers, write_headers, read_body and write_body.
Sanitize some of the return codes.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93777 13f79535-47bb-0310-9956-ffa450edef68
2002-03-07 22:13:15 +00:00
Bill Stoddard
ec5ec9665f Do a better job of cleaning up (plug memory leaks) and handling aborted
cache updates. We really need a better way to allocate cache_objects.
Making WAY too many malloc/calloc calls...


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93775 13f79535-47bb-0310-9956-ffa450edef68
2002-03-07 21:44:49 +00:00
Bill Stoddard
77bf9d14e0 Track cache size as items are added to and removed from the cache
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93772 13f79535-47bb-0310-9956-ffa450edef68
2002-03-07 19:27:58 +00:00
Bill Stoddard
c9ca452fa4 Place some limits on the size of the cache and the number of objects that can be
placed in the cache.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93771 13f79535-47bb-0310-9956-ffa450edef68
2002-03-07 19:21:56 +00:00
Bill Stoddard
793eb2217c Add a comment...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93768 13f79535-47bb-0310-9956-ffa450edef68
2002-03-07 15:16:25 +00:00
Bill Stoddard
7abb83cc31 Add CacheMinObjectSize and CacheMaxObjectSize directives to mod_mem_cache
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93763 13f79535-47bb-0310-9956-ffa450edef68
2002-03-07 14:55:10 +00:00
Sander Striker
a5ac6bf672 Cleanup some left behind style nits I missed and clean
one up I just introduced :(.
Add the standard comments to the module struct.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93761 13f79535-47bb-0310-9956-ffa450edef68
2002-03-07 14:13:23 +00:00
Sander Striker
7a7a919394 Always fun when you mess up your first commit...
Get the logic right this time.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93760 13f79535-47bb-0310-9956-ffa450edef68
2002-03-07 13:12:59 +00:00
Sander Striker
2ec1ba9812 Check to see if r->content_type != NULL before comparing it to something.
Remove a check that was in here twice.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93759 13f79535-47bb-0310-9956-ffa450edef68
2002-03-07 13:08:34 +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
Cliff Woolley
7aebccf01b We don't need transfer_brigade() because we already have macros to do that
for us, and faster.  :)

Warning, though:  transfer_brigade() was equivalent to APR_BRIGADE_CONCAT(),
and I don't think that was the right behavior for one of the two callers!
I changed that one to use APR_BRIGADE_PREPEND() since by my inspection that
looks like what it should be, but please check me on this.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93654 13f79535-47bb-0310-9956-ffa450edef68
2002-03-01 05:43:57 +00:00
Allan K. Edwards
309dbe5527 clean up the passed-in brigade since mod_deflate is through with it
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93611 13f79535-47bb-0310-9956-ffa450edef68
2002-02-27 21:49:33 +00:00
Bill Stoddard
575e49d588 Fix some formatting. No function change.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93568 13f79535-47bb-0310-9956-ffa450edef68
2002-02-25 19:10:05 +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
99021ad889 Add some messages. Be a bit smarter about detecting if a write has started
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93505 13f79535-47bb-0310-9956-ffa450edef68
2002-02-19 23:20:13 +00:00
Ian Holsman
7dc5832eb4 Sander's Stylistic Style Stuff
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93460 13f79535-47bb-0310-9956-ffa450edef68
2002-02-17 20:40:21 +00:00
Bill Stoddard
d8439c861f Add a reference counter to the mem_cache_object_t and code to
manage deleting the cache_object after the reference count
drops to 0. Not fully tested yet..


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93439 13f79535-47bb-0310-9956-ffa450edef68
2002-02-15 22:26:35 +00:00
Ian Holsman
858f5dbadf I'm happy now
gzip-only-text/html environment variable present


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93433 13f79535-47bb-0310-9956-ffa450edef68
2002-02-15 19:44:25 +00:00