David Reid [Fri, 11 Jan 2002 09:14:34 +0000 (09:14 +0000)]
This brings apache back in line with apr following the addition
of apr_file_dup2.
Until Win32 and OS/2 have the function added this will break their
builds, but Will Rowe has said he'll do it this morning and asked for
the patch to apr to go in :) Go Will!
Brian Pane [Fri, 11 Jan 2002 08:01:11 +0000 (08:01 +0000)]
Fix for a segfault in the worker MPM during graceful shutdown:
The per-transaction pools in the worker MPM can't be children of
the listener thread's pool, because that pool may go out of scope
while some workers are still procesing requests using the transaction
pools.
A pedantic change to prevent us from discovering, in the future, that
these support/ modules suddenly rely upon some of our apr/aprutil
features, by finding the build broken one morning.
Some servername goodness (well, if you call 'localhost' good, I don't.)
Add to that some nits in the overall comments, and drop all the bitty
copy modules/somemod/*.h include/ fooness, since we need the various
modules to deposit their droppings into the build tree install/ dir
just to compile ourselves.
The mutex must be pool-managed, not ssl managed. We are encountering
segfaults on Win32 when the cleanup of the mutex occurs after the pool
was destroyed.
Remove the link to mbox.apachelabs.org. (Amazingly, that link worked.)
But, we cite everything via the Message-ID to be archive-neutral.
(FWIW, www.apachelabs.org has a feature to search on Message-ID.)
Once again, try to bring the world into sync. Someday soon, we need to
generate this and Netware's from -std using awk. It really would make
more sense to strip out the appropriate directives as we build, instead
of 'toggling' the mpm with <IfModule > (at least, as an option during
build.) But that requires an un-nested syntax such as
<IfModule module module> or <IfNotModule module module> that would be
simpler to parse in awk. Our nested IfModules make this quite tricky.
The better final solution is possibly to add things like HAS_SCOREBOARD
to the 'build-in' defines, therefore assuring a simple test for any
mpm architecture.
*) Split all Win32 modules [excluding the core components mod_core,
mod_so, mod_win32 and the winnt mpm] into individual loadable
modules, so the administrator may individually disable the former
compiled-in modules by simply commenting out their LoadModule
directives. [William Rowe]
*) Saved Win32 module authors and porters many future headaches, by
duplicating the appropriate .h files such as os.h into the include
directory, including in the build tree. [William Rowe]
Also noticed that version stamp resources weren't generated for proxy
modules, this too is now fixed.
Doug MacEachern [Thu, 10 Jan 2002 04:55:19 +0000 (04:55 +0000)]
mod_ssl adjustments to help with using toolkits other than OpenSSL:
Use SSL functions/macros instead of directly dereferencing SSL
structures wherever possible.
Add type-casts for the cases where functions return a generic pointer.
Add $SSL/include to configure search path.
PR:
Obtained from:
Submitted by: Madhusudan Mathihalli <madhusudan_mathihalli@hp.com>
Reviewed by: dougm
Best to use -no- file extension here, since that always pops up the
'open with' dialog in MS Explorer, preventing the user from really
mucking anything up.
Change the name of the _tryssl to an underbar prefix so we know it is
an 'internal' thing, and try building explicit targets to avoid ever
dragging in .bsc construction.
Also introduce _browse. This is far from complete, but I'm working on
a mechansim to toggle browse database construction - of a single .bsc
file for DevStudio's browser database. The ugly bit is; it gobbles some
80MB for construction, so we will never waste that sort of space on
the typical case, but reserve it for developers who choose to toggle it.
Changed the project file to use the NDK (NovellNDK) environment variable
to locate the LibC SDK headers and libraries. Also added the Mod_Rewrite
and Mod_Auth_DBM targets to the main build project.
David Reid [Tue, 8 Jan 2002 17:07:19 +0000 (17:07 +0000)]
Restore the apr_pool_clear calls to main.c in case we have
third-parties who are overriding the open_logs hook, in which case
they'd miss the plog being cleared.
David Reid [Tue, 8 Jan 2002 16:30:16 +0000 (16:30 +0000)]
This small patch modifies the log's to use plog instead of pconf.
Basically pconf is cleared at different times from plog, and this
has the effect of leaving stderr closed when going into the next
stage of the config. This also had the effect of allowing FreeBSD
with threads to create a pipe with stderr's fd at one end, and this
resulted in problems with the signal polling and high cpu usage.
In addition, move the clearing of plog from main.c to core.c where
it seems more appropriate.
This solves the first and main problem that FreeBSD has with the
threaded MPM's.
Ryan Bloom [Tue, 8 Jan 2002 06:26:10 +0000 (06:26 +0000)]
Add the ability to pass flags to both apr_file_open and apr_mktemp.
The reason for this, is that it is very possible to want a temp
file that isn't deleted when the file is closed. It also makes sense
to have the flags in the apr_file_t if possible.
Greg Stein [Mon, 7 Jan 2002 22:36:15 +0000 (22:36 +0000)]
Fix how mod_dav examines methods in the request -- use the method number
from the request. To do this, we also need to register all of the new/custom
methods that mod_dav recognizes.
Note: this fixes a bug where a method (e.g. REPORT) would appear in a
Limit(Except) directive and Apache would register the method. The method
number in the request would then be something *other* than M_INVALID, which
threw off mod_dav's tests.
Doug MacEachern [Sun, 6 Jan 2002 17:39:52 +0000 (17:39 +0000)]
need to use $(top_srcdir) when installing build/instdso.sh
else make install does not work when when configured with a --srcdir
PR:
Obtained from:
Submitted by:
Reviewed by:
Brian Pane [Sun, 6 Jan 2002 06:41:30 +0000 (06:41 +0000)]
Eliminated various large (8KB) string buffers from the stack in
mod_include by adding support for a power-of-two pool-based allocator
in ap_ssi_parse_string(). (The default operation of this function
is backward-compatible, to support the other modules that call it.)
This change should help reduce memory usage for servers delivering
shtml pages.
Jeff Trawick [Fri, 4 Jan 2002 18:32:48 +0000 (18:32 +0000)]
for proxy CONNECT handling:
don't hard-code the address family of the target; respect
what the resolver told us
get a new socket each time we try to connect to one of the
target addresses as reported by the resolver; you can't
portably attempt to connect more than once on the same
socket
this is the same fix committed to proxy http support yesterday
Ian Holsman [Fri, 4 Jan 2002 17:58:36 +0000 (17:58 +0000)]
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:
Jeff Trawick [Fri, 4 Jan 2002 01:47:55 +0000 (01:47 +0000)]
Fix a couple of mod_proxy problems forwarding HTTP connections:
(1) PR #9190 It failed to connect to IPv6 hosts.
(2) It failed to connect when the first IP address returned by
the resolver was unreachable but a secondary IP address was.
Bill Stoddard [Thu, 3 Jan 2002 19:20:54 +0000 (19:20 +0000)]
Fix seg fault in HTTP_IN when trying to handle the LimitRequestBody
directive when reading a proxy response. We should bypass LimitRequestBody
activities when handling a response from the proxied server.
I don't think this will circumvent requestbody checking on a large request
coming into the server that is destined to be proxied. (not tested though).
Merge a singular path for dir_walk to parse, if we have an r->filename
which is an APR_DIR, and path_info contents. Also, al la Mr. Pane,
optimize our canonical_filename by simply noting the length of the
identity match, and refresh canonical_filename when we are finished.
Eliminate a duplicate absolute path test, and NEVER serve a request
for an APR_DIR file from the cache when we have path_info, it is a
contradition (APR_DIR always forces dir_walk to gather the next segment
from path_info, even if it is APR_NOFILE, until we have no path_info.)
So we can't use a predetermined filename/path_info combo, ever, if the
filename resolves to an APR_DIR.
Bill Stoddard [Wed, 2 Jan 2002 19:12:40 +0000 (19:12 +0000)]
Change the return code from APR_TIMEUP to APR_ECONNABORTED, which seems
to be a bit more descriptive. Move the check to inside the inner while()
loop and add an additional check for eos. If we get an EOS bucket, there
is no point in going further. Hopefully this will fix the last seg fault
in the function.
Fix LimitRequestBody directive by moving the relevant code from
ap_*_client_block to ap_http_filter (aka HTTP_IN). This is the
only appropriate place for limit checking to occur (otherwise,
chunked input is not correctly limited).
Also changed the type of limit_req_body to apr_off_t to match the
other types inside of HTTP_IN. Also made the strtol call for
limit_req_body a bit more robust.
Brian Pane [Tue, 1 Jan 2002 20:36:18 +0000 (20:36 +0000)]
Generalized the recent prep_walk_cache optimizations to allow other
modules to register "notes" within the array of working data in
the core_request_config
Thanks Mr. Trawick, backtraces can be very enlightening.
This fixes two bugs, the segfault when researching index numbers,
and another. We don't hint anywhere that LanguagePriority is a
cumulative setting, in fact the syntax doesn't suggest so either.
Merges are always slow, there is no reason to make this even slower.
So the patch has the LanguagePriority directive override any existing
LanguagePriority list from an earlier container.
Bill Stoddard [Mon, 31 Dec 2001 20:53:28 +0000 (20:53 +0000)]
Prevent mod_proxy from truncating one character off the
end of the status line returned from the proxied server.
Note that buffer is NULL terminated by the call to
ap_proxy_string_read() so there is no need to terminate it
again.
Submitted by: Adam Sussman
Reviewed by: Bill Stoddard
Bill Stoddard [Mon, 31 Dec 2001 20:43:59 +0000 (20:43 +0000)]
Eliminate loop in ap_proxy_string_read(). Need to be able to handle
getting an empty brigade from ap_get_brigade(). Also made sure that
we always call ap_get_brigade() in readline mode.
Submitted/Reviewed by: Adam Sussman & Bill Stoddard
Saw this bug several hours ago, but it slipped my mind. We no longer
skip over the leading '/' character, since the token_re already strips
the / delimiters.
To provide more flexibility in handling quotes, allow the backtick quote
for SSI tag arguments (e.g. <!--#echo val=`foo` -->). This helps with
arguments containing both single and double quotes.
Ever tried to extract some value of QUERY_STRING from within SSI?
Now you can :) Provides $0..$9 results for any regex evaluation,
and strengthens the expr parser for regex expressions.