Improvements suggested by Brian Pane, first assure all OS's get to deal
with handler 'server-parsed', do the xbithack bit tests before testing
it's string values (protected against a null point).
Once again, if mod_dir will perform an internal redirect into a
RESPONSE BODY (as opposed to 'something else' of it's own generation)
it needs to make the caller aware of the results (e.g. an included
subrequest) so the caller can decide if the result is suited (e.g.
including text/html only, but refusing to include other binary results.)
Since we can know everything about the results of the mod_dir processing
by the fixups phase, let it perform all resolutions before the caller
of ap_process_request_internal makes it's decisions.
Context mustn't be transformed in the insert_filters hook, it merely
provides a point to insert filters already determined. We can't wait
for the insert_filters phase to 'redetermine' such things.
Everything we are doing here can reliably occur in the fixup phase,
after the types phase has completed.
This otherwise ineffectual patch allows modules to perform internal
redirects of dirs into other resources, while still treating such a
resource as a dir, based on the original apr_dir_read results.
Aaron Bannert [Thu, 27 Dec 2001 21:36:10 +0000 (21:36 +0000)]
Two fixes in one:
- No longer calls exit() when the secret fails to initialize, instead
post_config just returns !OK and lets the server bail out.
- No longer fails on DSOs -- since we load-unload-reload DSOs we lose
any static memory that was initialized during the first load.
This patch allows us to simply pass on the first call to post_config,
and then do the initialization in the second call.
Greg Ames [Thu, 27 Dec 2001 19:53:37 +0000 (19:53 +0000)]
change ap_unix_create_privileged_process() to allocate enough space in
the newargs array to allow for a null terminator. This allows suexec and
mod_cgid to work together reliably.
Apparently, rounding up the size to a multiple of 8 bytes in apr_palloc
hid the problem sometimes. At other times, suexec would complain
about a null command name.
Aaron Bannert [Thu, 27 Dec 2001 19:40:15 +0000 (19:40 +0000)]
Style changes only. Lots of tab alignment issues, and added lots of
extra {} blocks. I first ran it through M-x untabify, then went through
the whole thing by hand, then compiled/tested it. This is a preemptive
style-strike.
Ian Holsman [Thu, 27 Dec 2001 06:03:13 +0000 (06:03 +0000)]
add a 'AuthDBMType' so that users can select what type of DBM they want to
use to authenticate users.
I think this removes a 'showstopper' (deprecating mod_auth_db)
Brian Pane [Wed, 26 Dec 2001 12:07:55 +0000 (12:07 +0000)]
Rearranged the code in mod_include's BNDM string-search function
for faster execution.
This new code short-circuits out of the inner scanning loop
after a single comparison when it hits a character not in the
"<!--#" pattern. Compared to the previous code, this version
does more work for characters in the pattern and less work for
characters not in the pattern. In practice, the net result
seems to be a speedup for typical shtml files, where characters
in the pattern are less common than characters not in the pattern.
David Reid [Tue, 25 Dec 2001 12:24:14 +0000 (12:24 +0000)]
Add ap_os_killpg as well as unixd_killpg and beosd_killpg.
Move the worker MPM to use ap_os_killpg in place of unixd_killpg as
this makes it more portable.
Ryan notes that really we should be using the POD mechanism to
control death of the child processes, so this is temporary until
we have that change in place. Note added to STATUS to that effect.
Jeff Trawick [Mon, 24 Dec 2001 13:18:44 +0000 (13:18 +0000)]
The scoreboard is no longer created while we can write to
stderr, so call ap_log_error() to note problems allocating
the scoreboard.
apr_shm_malloc() doesn't set any kind of error code, so don't
try to reference errno.
setup_shared() now returns an error code to its caller rather
than exiting directly. This isn't a complete fix, as
ap_create_scoreboard() needs to do the same thing. Currently,
when we can't allocate the scoreboard we leave the mod_cgid
daemon process stranded.
Resync a few documentation stanzas [all I have time for today], but
MOST SIGNIFICANTLY;
Unwind '_' characters from ALL of our example IP names. Since we waste
oodles of time stating 'Underscores are invalid in DNS entries' - why
have examples that contradict the RFC?
Jeff Trawick [Sat, 22 Dec 2001 04:17:56 +0000 (04:17 +0000)]
SH_LDFLAGS wasn't getting evaluated properly when it included
makefile variables
but, we stopped needing SH_LDFLAGS in apxs on AIX since we switched
to run-time linking and I never found out for sure that the use of
SH_LDFLAGS actually helped BeOS or OS/390, so I'm yanking out the
reference to SH_LDFLAGS
if/when we need such a thing in apxs, we'll have a new variable so
we can distinguish between special flags needed for Apache core
DSOs (which might have stuff specific to some Apache core DSO that
was discovered during Apache configurat) vs. special flags needed
by any DSO
Brian Pane [Fri, 21 Dec 2001 04:21:15 +0000 (04:21 +0000)]
Fixed a bug in ap_rgetline()
When an input line required more than one read, each subsequent
block of data was copied on top of the previous one. So if a
request line got split into multiple packets, the data would be
corrupted. The new code uses a power-of-two allocator to expand
the buffer and properly append the next block of data at the end
of the previous one.
Jeff Trawick [Wed, 19 Dec 2001 18:16:40 +0000 (18:16 +0000)]
Add some documentation on the ServerLimit and ThreadLimit
directives.
Both were added to mpm_common.html even though ThreadLimit
is used only by worker at the moment. It is expected that
ThreadLimit will be supported by WinNT and perchild MPMs
in the future.
Brian Pane [Tue, 18 Dec 2001 23:57:36 +0000 (23:57 +0000)]
Skip the setting of Last-Modified in the response header on
requests or subrequests for which no response header will be
generated (a performance improvement for mod_include)
Jeff Trawick [Tue, 18 Dec 2001 21:33:27 +0000 (21:33 +0000)]
leaving the pipe-of-death in the ap_listeners list led to segfaults
during sighup processing since the pipe-of-death listen_rec was
allocated from a short-lived pool
simply allocating the pipe-of-death listen_rec from the right pool
isn't a complete fix since at that point we no longer get the
proper cleanup and we're left with a file descriptor leak
the simplest overall fix seems to be to keep the pipe-of-death out
of the ap_listeners list for now
Jeff Trawick [Tue, 18 Dec 2001 04:59:13 +0000 (04:59 +0000)]
Stop using HARD_SERVER_LIMIT/HARD_THREAD_LIMIT all over the place
and instead use the mpm query function to retrieve those limits and
use those dynamically-retrieved values when walking the scoreboard.
Bill Stoddard [Mon, 17 Dec 2001 14:02:59 +0000 (14:02 +0000)]
Win32: The async AcceptEx() event should be autoreset upon
successful completion of a wait (WaitForSingleObject). This
eliminates a number of spurious
setsockopt(SO_UPDATE_ACCEPT_CONTEXT) failed." messages.
Brian Pane [Sun, 16 Dec 2001 09:54:14 +0000 (09:54 +0000)]
Replaced an instance of apr_pool_userdata_setn() with apr_pool_userdata_set()..
the value of "userdata_key" is an address on the stack when compiled with
gcc 2.95.3 on Solaris/Sparc, so storing the address directly in the hash
table is unsafe.
Jeff Trawick [Sat, 15 Dec 2001 13:56:36 +0000 (13:56 +0000)]
Move any load library path environment variables out of
apachectl and into a separate environment variable file which
can be more easily tailored by the admin. The environment
variable file as built by Apache may have additional system-
specific settings. For example, on OS/390 we tailor the heap
settings to allow lots of threads.