Brian Pane [Sun, 27 Jan 2002 01:54:54 +0000 (01:54 +0000)]
Added new functions ap_add_input_filter_handle() and
ap_add_output_filter_handle()
There are many places in the core modules where we do
ap_add_input_filter() or ap_add_output_filter() on a
hardcoded filter name (e.g., "CORE" or "BYTERANGE").
This requires a string-to-filter mapping that wastes
CPU time. (Even though the string lookup uses a trie
for speed, it still ranks as a big consumer of CPU time
because of the large number of filters added per request.)
The new ap_add_*_filter_handle() functions will allow
us to skip the string-to-filter mapping in cases where
the module adding the filter happens to have the
ap_filter_rec_t* for the registered filter (e.g., because
it's the same module that registered the filter in the
first place).
Jeff Trawick [Sat, 26 Jan 2002 23:01:31 +0000 (23:01 +0000)]
ap_rgetline(): completely ignore an empty bucket... previously the logic
generally worked but with a memory debug build it could
crash since some memory debuggers don't like an alloc of
zero bytes
Greg Ames [Sat, 26 Jan 2002 20:16:01 +0000 (20:16 +0000)]
ap_sub_req_lookup_dirent: fix mod_negotiation loop with near infinite
subrequests
this function has been creating bogus subrequest URIs when there is
path_info for a long time. They didn't matter until fixup_dir started
using them for URI subrequests, which led to a loop with ever growing
bogus internal URIs and filenames.
Ian Holsman [Fri, 25 Jan 2002 20:09:33 +0000 (20:09 +0000)]
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.
No. I don't like this patch. I like what it does [shared scoreboard
for Windows, finally] but not how it's implemented.
However it works, and is equally crufty to what already exists for
win32 listeners and other exposed data within scoreboard.c.
To do this right, we need to drop all the external references to data
within the scoreboard, and add an accessor for remaining bits (such as
Win32's need for direct access to the apr_shm_t.) And within Win32,
we need to stack all this _within_ the pre-mpm hook. But those are
missions in and of themselves.
Change ap_get_brigade prototype to remove *readbytes in favor of readbytes.
If you need the length, you should be using apr_brigade_length. This is
much more consistent. Of all the places that call ap_get_brigade, only
one (ap_http_filter) needs the length. This makes it now possible to
pass constants down without assigning them to a temporary variable first.
Also:
- Change proxy_ftp to use EXHAUSTIVE mode (didn't catch its -1 before)
- Fix buglet in mod_ssl that would cause it to return too much data in
some circumstances
Greg Stein [Fri, 25 Jan 2002 00:17:31 +0000 (00:17 +0000)]
Fix some serious, hard-core breakage :-( I don't even know how it
compiled and linked.
* there is no UNIX symbol, so go back to #ifndef WIN32. that other
platforms can pile on as needed until we have a proper mechanism.
* reinstate the liveprop callbacks and the dav_hooks_liveprop_fs
structure. since the latter structure is referred to elsewhere in
the file, it better be defined.
* use a "feature" name of DAV_FS_HAS_EXECUTABLE rather than
conditionally specifying the property. convert the tests over to
that symbol.
Rewrite ap_rgetline to remove the need to have an "internal" brigade stored
in the core_module structure by using the AP_MODE_SPECULATIVE filter mode
to determine if MIME-continuation should occur.
Notes:
- ap_rgetline has a new prototype.
- ap_rgetline returns APR_ENOSPC when we are out of buffer space.
All direct callers of ap_rgetline are now adjusted to handle this new API.
ap_getline will mimic the old API for now.
Divorce dav_fs from the DAV_PROPID_FS_executable property at the
very head of this module, and drop all references as soon as we
determine that 'our property' isn't supported.
Cause dav_fs_get_parent_resource to fail if the file path is entirely
invalid or incomplete, or if it is root [determined by the platform's
apr implemention]. Identified by Greg Stein.
Eliminate a large number of Win32-isms. In large part, these can apply
to other one-off platforms such as OS2, and immediately impact a new port
which played by all the APR rules.
Aaron Bannert [Wed, 23 Jan 2002 07:10:16 +0000 (07:10 +0000)]
Currently pcre/config.h and pcre/internal.h are getting installed - it
seems they aren't used, and adding a rogue config.h into the include
path can cause problems for a module which picks it up.
(Better late than never -- this patch was submitted Fri, 7 Dec 2001.)
Submitted by: Joe Orton <joe@manyfish.co.uk>
Reviewed by: Aaron Bannert
Aaron Bannert [Wed, 23 Jan 2002 06:51:18 +0000 (06:51 +0000)]
Although this patch is technically correct, I'm not happy with
the way it gets things done. OTOH, it is a simple enough change
to get things working correctly for now. I will come up with
the right way to do this in the next couple days.
This patch re-enables the use of anonymous shared memory in the
scoreboard on platforms that have it.
Ian Holsman [Mon, 21 Jan 2002 01:43:30 +0000 (01:43 +0000)]
These changes are to allow caching of subrequests via a quick_handler.
* Change SUBREQ_CORE so that it is a HTTP_HEADER (20) filter instead of a content filter (10)
this allows subrequests to add content filters properly
* Change subreq handling of 'handle-include' so that it splits/passes the brigade before the subreq
is created. (This allows quick_handler to push content back from this phase)
Joshua Slive [Sat, 19 Jan 2002 17:39:48 +0000 (17:39 +0000)]
This example doesn't really do what it claims. Instead, lets make it simpler
by discussing ONLY the .htaccess issue. The other issue is covered by the
next example.
Input filtering prototype change: Socket blocking type should be
separate from the input filter mode type.
We also no longer look at readbytes to determine the method of
filter operation. This makes the use of filters more obvious and
allows a wider range of options for input filters modes.
To start with, the new input filter modes are:
AP_MODE_READBYTES (no more than *readbytes returned)
AP_MODE_GETLINE (old *readbytes == 0 case)
AP_MODE_EATCRLF (old AP_MODE_PEEK)
AP_MODE_SPECULATIVE (will be used in a future ap_getline rewrite)
AP_MODE_EXHAUSTIVE (old *readbytes == -1 case)
AP_MODE_INIT (special case for NNTP over SSL)
The block parameter is an apr_read_type_e: APR_BLOCK_READ, APR_NONBLOCK_READ
This also allows cleanup of mod_ssl's handling in the getline case.
Reviewed by: Ryan Bloom (concept), Greg Stein (concept)
Provide the win32 worker process a null (but valid) stdout pipe, and
redirect child startup errors to the main server error log.
Corresponds to the change in Apache 1.3.23
Bill Stoddard [Thu, 17 Jan 2002 22:35:09 +0000 (22:35 +0000)]
On HPUX 11.x, the 'ENOBUFS, No buffer space available'
error occures because the accept() cannot complete.
You will not see ENOBUFS at 10.20 because the kernel
hides any occurrence from being returned from user space.
ENOBUFS at 11.0 TCP/IP is quite possible, and could
occur intermittently. As a work-around, we are going to
ingnore ENOBUFS.
Submitted by: madhusudan_mathihalli@hp.com
Reviewed by: Bill Stoddard
Allow the user to get detailed debugging information without a full
recompile [absolutely necessary on Win32 and other platforms that
really don't support administrator-compilation.]
-e level follows the LogLevel options.
The only question, should -e override the compiled-in default for
the creation of the server_rec? No strong feeling either way, here.
Martin Kraemer [Thu, 17 Jan 2002 11:18:03 +0000 (11:18 +0000)]
Fix minor typos. Mention that mod_ssl is part of Apache-2.0.
Change absolute self-references to relative jumps.
TODO:
* IMHO the topic ToC3 should be deleted completely.
* All references to "patch Apache" or "EAPI patch" should be removed
* A native english speaker might want to proof-read the doc and polish it