Limit the threaded mpm to quiescing one process at a time.
This is to fix a problem where the scoreboard is filled with
quiescing processes and no working processes can start, triggered by
MaxRequestsPerChild. perform_idle_server_maintenance could theoretically
cause it as well.
Ryan Bloom [Sun, 22 Apr 2001 22:19:32 +0000 (22:19 +0000)]
At the hack-athon we decided to change the way that input filters
determine how much data is returned to the previous filter. Prior to this
change, we used a field in the conn_rec to determine how much to return.
After this change, we use an argument to ap_get_brigade. This makes it
much more obvious how things work at all levels, so that module authors
can easily determine how much data is supposed to be returned to them.
Revert about half of the last commit because of an oversight on my part
that broke it. Unfortunately, fixing the oversight "the right way" is
almost as ugly as the original code; it's easier to just go back to the way
it was, at least for now.
The problem is that the original code would delete buckets from foo through
bar in the brigade, and the patched code deletes *everything* up through
bar, which is bad. I could have fixed it by doing two splits, but that
introduces too many palloc's for my taste. It's also fixable with RING macros,
but I refuse to start using RING macros directly on brigades. The best
solution would be if there were a brigade equivalent to a RING_UNSPLICE/
RING_INSERT_HEAD sequence (this sequence is also used interally by
apr_brigade_split(), btw), something like this:
APR_BRIGADE_TRANSFER_BUCKETS(oldbrigade,newbrigade,startbucket,endbucket);
Absent that, the affected parts of the patch are hereby reverted (grumble,
grumble). If people liek the APR_BRIGADE_TRANSFER_BUCKETS() idea, I'll
implement that and repatch mod_include later.
Roy T. Fielding [Sat, 21 Apr 2001 12:23:37 +0000 (12:23 +0000)]
Revert the change that moved keepalives out of conn_rec. That variable
controls the number of requests per connection, regardless of the protocol
used by the request.
Change mod_include to use the latest bucket API tricks. This gets
rid of some obscure while loop magic that had to be done before,
making mod_include easier to read and a better example for future
filter writers.
There should be no semantic changes in this patch... just a 1-to-1
mapping from while loops to bucket API calls that do the same thing.
Bill Stoddard [Fri, 20 Apr 2001 17:59:05 +0000 (17:59 +0000)]
Fix seg fault at start-up introduced by Ryan's change to enabl
modules to specify their own logging tags. mod_log_config
registers an optional function, ap_register_log_handler().
ap_register_log_handler() was being called by http_core before
the directive hash table was created. This patch creates the
directive hash table before ap_register_log_handler() is
registered as an optional function.
Submitted by: [jean-frederic clere <jfrederic.clere@fujitsu-siemens.com>]
Reviewed by: Jeff Trawick, Bill Stoddard
Jeff Trawick [Fri, 20 Apr 2001 15:38:24 +0000 (15:38 +0000)]
Under certain circumstances, Apache did not supply the
right response headers when requiring authentication.
[Gertjan van Wingerde <Gertjan.van.Wingerde@cmg.nl>] PR#7114
(This is a port of the change that went into Apache 1.3.19.)
Ryan Bloom [Wed, 18 Apr 2001 21:06:07 +0000 (21:06 +0000)]
Allow modules to specify their own logging format specifier. Basically,
mod_log_config has registered an optional function, that other modules
can use to specify a function to be called. This is analogous to the way
that mod_include works. This also allows http to do the connection
logging itself, without exposing HTTP specific pieces to other modules.
Ryan Bloom [Wed, 18 Apr 2001 20:56:04 +0000 (20:56 +0000)]
There is a bug in how we sort some hooks, the pre-config hook is one that
is definately incorrect. Basically, the first time we call the pre-config
hooks, they are sorted correctly. However, when we call them the second
time, we use the order that modules are loaded into the server. This
move basically puts the http_module after mod_log_config in the compiled
server. It is a hack, and a work-around to allow for my next commit.
When the hook sort issue is solved, this should be re-named to config.m4
David Reid [Wed, 18 Apr 2001 20:51:35 +0000 (20:51 +0000)]
This changes the build process as outlined in my email earlier this week.
Essentially we now build the static objects, then allow a platform to run
a given command, build the shared modules, then run another command before exiting.
This gets us building dso's on beos and may provide a better framework for some of
the other "strange" platforms out there without stopping the normal ones working.
Ryan Bloom [Wed, 18 Apr 2001 03:53:34 +0000 (03:53 +0000)]
Move the keepalives field out of the conn_rec and into an HTTP specific
connection record. This also moves some HTTP specific back out of the
core and into the HTTP module.
Bill Stoddard [Tue, 17 Apr 2001 13:09:05 +0000 (13:09 +0000)]
Retagged.. Now bump back to 2.0.18-dev. For anyone looking at this in the future,
I screwed up tagging the 2.0.17 release. Should have set the string to 2.0.17, then tagged.
I left it at 2.0.17-dev by mistake.
allow non-absolute URIs to occur in some of the requests. RFC 2518 states
that the Destination: header (used in MOVE/COPY) must be an absolute URI, so
it keeps that constraint.
Ryan Bloom [Mon, 16 Apr 2001 21:16:53 +0000 (21:16 +0000)]
If a higher-level filter handles the the byterange aspects of a
request, then the byterange filter should not try to redo the
work. The most common case of this happening, is a byterange
request going through the proxy, and the origin server handles
the byterange request. The proxy should ignore it.
Ryan Bloom [Sat, 14 Apr 2001 23:00:28 +0000 (23:00 +0000)]
We don't really treat this field as a const, and currently we are getting
warnings because on line 536, we are trying to assign a non-const to a
const. This started happening after a fix for Windows. This change should
solve the problem on all systems.
Paul J. Reder [Sat, 14 Apr 2001 21:11:09 +0000 (21:11 +0000)]
Changed the threaded mpm to have child_main join to each of the
worker threads to make sure the kids are all gone before child_main
exits after a signal (cleanup from perform_idle_server_maintenance).
This is an extension of Ryans recent commit to make the child_main
the signal thread.
But then thats what the new entry in the file says...
Paul J. Reder [Sat, 14 Apr 2001 21:06:48 +0000 (21:06 +0000)]
Changed the threaded mpm to have child_main join to each of the
worker threads to make sure the kids are all gone before child_main
exits after a signal (cleanup from perform_idle_server_maintenance).
This is an extension of Ryans recent commit to make the child_main
the signal thread.
Ryan Bloom [Fri, 13 Apr 2001 19:00:39 +0000 (19:00 +0000)]
Add more options to the ap_mpm_query function. This also allows MPMs to
report if their threads are dynamic or static. Finally, this also
implements a new API, ap_show_mpm, which returns the MPM that was
required into the core.
We tried to make all of the MPMs report their threading capabilities
correctly, but each MPM expert should double check us.
Change AP_MIN_BYTES_TO_WRITE from 9000 to 8192 to match the bucket buffer
size. This fixes the 8192-808-8192-808 iovec-length sequence problem
on platforms using writev() (eg OS/2).
Ryan Bloom [Thu, 12 Apr 2001 20:06:50 +0000 (20:06 +0000)]
The ap_f* functions should flush data to the filter that is passed in,
not to the filter after the one passed in. The fixes a bug, where one
filter is skipped when using ap_f*.
Submitted by: Ryan Morgan <rmorgan@covalent.net>
Ryan Bloom [Thu, 12 Apr 2001 18:46:32 +0000 (18:46 +0000)]
Convert the apr_create_signal_thread to apr_signal_thread. The main
difference, is that instead of creating a separate thread to listen for
signals, the thread that calls this function does the listening. Many
platforms have issues when the main thread isn't the thread that is
listening for signals. Even more platforms complain when the main thread
dies, but the process doesn't. This gets the main thread back to being
the signal handling thread.
Ryan Bloom [Thu, 12 Apr 2001 15:14:06 +0000 (15:14 +0000)]
Force the dav/fs config.m4 file to be added to the configure script after
the dav/main config.m4. This script should make sure that dav is enabled
before turning on dav/fs, but I leave that for somebody else to do.
Ryan Bloom [Thu, 12 Apr 2001 15:12:48 +0000 (15:12 +0000)]
Make the dav/main config.m4 file be added to the configure script after
httpd, and make dav default to no if http is not enabled. Dav still
defaults to yes if http is in the server. Dav is incredibly HTTP centric,
and makes little to no sense without HTTP
Ryan Bloom [Wed, 11 Apr 2001 23:37:16 +0000 (23:37 +0000)]
When I initially pulled the BYTERANGE filter into the core, Greg Stein
told me I was wrong. I was wrong, and Greg was right. This commit
just moves the byterange filter and its related functions out of the core,
and puts them back in the HTTP specific module.
Submitted by: Greg Stein
Removed apr_bucket_do_create() macro, which was causing warnings
about unreachable code in some compilers (notably MSVC). What
used to be done by this macro is now done inline in the various
apr_bucket_foo_create() functions. [Cliff Woolley]
Fix the naming of the apr_threadattr_detach_xxx functions. get and set were
reversed.
This may have broken the Unix threaded mpm's when they started using the
bogus "set" function. A likely symptom would be failure to stop a threaded
process cleanly.
Note: it appears these functions are essentially no-ops except in Unix.