Deploy ap_sub_req_lookup_dirent() for the main loop. Note we _really_
need to further optimize this code, there are dozens of perhaps unnecessary
stat calls, and meaningless #ifndef OS2 protections around apr_lstat()'s.
OS2 has lstat (It's simply stat()) so we should pull the os-specific cruft.
Sorry, second pass, working on legibility. This patch introduces the
fill_in_sub_req_vars function to propogate the rnew values, but doesn't
yet hook it in. Note that there are two discrepancies, apparently
pretty bad ones, that have been moved after the 'common code' so the
next patch becomes pretty simple.
Cliff Woolley [Wed, 27 Jun 2001 20:18:09 +0000 (20:18 +0000)]
*) Account for the new pool parameter to apr_bucket_file_create()
and apr_bucket_file_make().
*) Simplify mod_file_cache's sendfile_handler by taking advantage
the new ability of file buckets to handle files opened in XTHREAD
mode. [Also inlined some of the brigade construction stuff in
mod_file_cache's handlers to save a palloc() or two.]
Move duplicated rnew cloning from apr_ap_sub_req_lookup_*() functions,
and add an ap_sub_req_lookup_dirent() to create a subrequest from the
results of an apr_dir_read() for mod_negotiation and mod_autoindex.
Bill Stoddard [Tue, 26 Jun 2001 17:40:58 +0000 (17:40 +0000)]
Fix problem handling FLUSH bucket in the chunked encoding filter.
Module was calling ap_rwrite() followed by ap_rflush() but the
served content was not being displayed in the browser. Inspection
of the output stream revealed that the first data chunk was
missing the trailing CRLF required by the RFC
Cliff Woolley [Tue, 19 Jun 2001 18:48:21 +0000 (18:48 +0000)]
The bucket_foo_create() functions do not need to use calloc() because
all of the members of the apr_bucket struct are always explicitly
initialized anyway... malloc() should be used instead.
Jeff Trawick [Mon, 18 Jun 2001 11:50:42 +0000 (11:50 +0000)]
The patch fixes 2 things.
* apr_terminate now has the right declaration so it can be used
directly in atexit
* Win2K gets a divde by zero error when heartbeatres is zero (reproduce via
support\Debug\ab.exe -k -c 6 -n 100 localhost/
Submitted by: Ian Holsman <ianh@cnet.com>
Reviewed by: Jeff Trawick
Jeff Trawick [Fri, 15 Jun 2001 18:33:09 +0000 (18:33 +0000)]
Fix brokenness when ThreadsPerChild is higher than the built-in
limit. We left ap_threads_per_child at the higher value which
led to segfaults when doing certain scoreboard operations.
Jeff Trawick [Thu, 14 Jun 2001 15:46:44 +0000 (15:46 +0000)]
fix some more signalling issues:
. in ONE_PROCESS mode, bail out immediately for SIGHUP and
SIGINT
Note that if you send HUP or INT and have cgid then cgid won't
go away. If you generate the interrupt signal from the httpd
terminal then cgid will go away, [I guess] because SIGINT gets sent
to the process group. Perhaps just_die() needs to have logic to
send to other processes in the group for ONE_PROCES mode
Jeff Trawick [Thu, 14 Jun 2001 15:26:48 +0000 (15:26 +0000)]
For SIGHUP in the server processes, we attempt to go away immediately,
just as for SIGTERM. If we deadlock because of some module or library
issue then SIGKILL will come soon enough.
Stop dorking with SIGTERM and SIGHUP in make_child(). That makes it
kind of hard for the caller to set up for ONE_PROCESS mode.
Greg Stein [Wed, 13 Jun 2001 20:11:45 +0000 (20:11 +0000)]
Define a hook for fetching management/status items.
This patch was submitted by Ian Holsman. Greg revised some names, applied
the Apache style, and namespace-prefixed the public symbols. Minor bugfix in
the use of the hook implementation macro.
Submitted by: Ian Holsman <IanH@cnet.com>
Reviewed by: Greg Stein
Cliff Woolley [Wed, 13 Jun 2001 16:48:37 +0000 (16:48 +0000)]
* apr_brigade_partition() now returns an apr_status_t (finally!).
* did some code cleanups/optimizations in that function.
* updated Apache's byterange filter to handle the new prototype. added
error handling to the byterange filter should apr_brigade_partition()
ever fail, which it never will unless somebody either removes the earlier
call to apr_brigade_length() for some unknown reason or invents a new
bucket type that is of a predetermined length but which cannot be split
natively (or which has a split that might fail). might as well be
future-proof.
Ryan Bloom [Wed, 13 Jun 2001 13:44:40 +0000 (13:44 +0000)]
Add a pool to the ap_save_brigade prototype. This removes a todo from
the comments that is really necessary before the setaside stuff will
work properly.
Greg Ames [Tue, 12 Jun 2001 19:03:08 +0000 (19:03 +0000)]
Fix seg faults and/or missing output from mod_include. The
default_handler was using the subrequest pool for files and
MMAPs, even though the associated APR structures typically
live longer than the subrequest.
Bill Stoddard [Tue, 12 Jun 2001 17:06:04 +0000 (17:06 +0000)]
Extend mod_setenvif to support specifying regular expressions
on the SetEnvIf (and SetEnvIfNoCase) directive attribute field.
Example: SetEnvIf ^TS* [a-z].* HAVE_TS
will cause HAVE_TS to be set if any of the request headers begins
with "TS" and has a value that begins with any character in the
set [a-z]. [Bill Stoddard]
Jeff Trawick [Tue, 12 Jun 2001 14:04:12 +0000 (14:04 +0000)]
fix the bindprocessor() code selection; we need to test for the
presence of the bindprocessor() function, not for sys/processor.h,
which exists on some systems that don't have bindprocessor()
Jeff Trawick [Mon, 11 Jun 2001 18:23:21 +0000 (18:23 +0000)]
back out a change from last week that reversed the meaning of pod_in and
pod_out; after that change, all read and write syscalls on the handles
failed because pod_in was only readable and pod_out was only writable
we could instead reverse the order of the parameters to apr_pipe_create
so that the descriptors returned by pipe() get put in the right place,
but it seems better to stick with APR terminology for what is the input
handle and what is the output handle
Cliff Woolley [Mon, 11 Jun 2001 14:46:30 +0000 (14:46 +0000)]
Silence gcc warning about rv being used when possibly uninitialized. That
can only happen if n<=1 (ie, a bad parameter value), so I figure APR_EINVAL
is the correct default value.
Bill Stoddard [Sun, 10 Jun 2001 21:01:57 +0000 (21:01 +0000)]
Fix look in htdigest. Reimplemented getline to work properly with
APR. Shuld consider adding apr_file_getline() to APR. Should also consider
changing apr_file_getc() to return characters rather than apr_status.
Was certain I had committed this. Position the scoreboard members such
that the size and members can be derrived by the most stable elements,
followed by derived elements. [Harrie Hazewinkel]
Updating docs to change around the order of extern and
AP[RU]_DECLARE_DATA. If this is incorrect, please yell.
However, the vast majority of the code follows the convention
documented in this patch.
If this is in error, I will gladly back it out.
Add the missing AP[RU]_DECLARE_DATA symbols to httpd.exp.
httpd.exp should now be generated automatically.
Any missing symbols are now the fault of awk scripts.
Or rather, their authors. :)
Jeff Trawick [Fri, 8 Jun 2001 16:53:10 +0000 (16:53 +0000)]
the input handle to the pod (used by child processes) needs to be non-blocking
before this, no requests could be processed by prefork since after connect
from the client prefork would block reading the pod
the write handle to the pod probably doesn't have to be non-blocking, but
getting EAGAIN for the pipe-full condition, rather than blocking, is nice
for now since it would tend to indicate that something is FUBAR; on the other
hand, this probably needs to change in order to support more than 4K workers