Martin Kraemer [Fri, 27 Apr 2001 15:16:41 +0000 (15:16 +0000)]
Prevent a core dump (openssl_state_machine.c is completely infected with
assert()s in place of sensible error handling) when a server-root-relative
certificate path is given (which is what most users are going to try first).
assertion "n > 0" failed: file "openssl_state_machine.c", line 142
That does NOT fix the openssl_state_machine.c though., So, never try to
use invalid certs, missing keys or other fancy "1st time user" stuff.
Martin Kraemer [Fri, 27 Apr 2001 08:41:01 +0000 (08:41 +0000)]
Search for OpenSSL in the "standard locations" .../include and .../lib
which are ubiquitous after openSSL's "make install". The old logic relied
on a common directory for both include files and libraries (very non-standard).
fast-path some cases, primarily to avoid an allocation when it isn't needed.
for a "nice" piece of cdata which is in one chunk, this can usually avoid an
allocation.
Fix a reference to "ctx" in mod_include's CREATE_ERROR_BUCKET macro
to "cntx", which is the actual name of the argument to that macro. It
accidentally worked before because all of the callers of the macro happen
to be passing in a variable named "ctx". If one of them were to ever try
to pass in a context named something else, bad things would happen.
Paul J. Reder [Wed, 25 Apr 2001 13:42:38 +0000 (13:42 +0000)]
This patch puts enough of the signal processing back in so that the signals
are all handled properly now. My previous patch fixed the deadlock race
condition, but broke the user directed signal handling. This fixes it to work
the it did before (primarily SIGTERM is now working).
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).