Ruediger Pluem [Sat, 18 Nov 2006 22:17:33 +0000 (22:17 +0000)]
* Use the query string stored in r->parsed_uri.query instead of r->args
as r->args could have been changed (e.g. via mod_rewrite) after the quick
handler hook. This causes resources to be stored under a key, where they
cannot be fetched again in the quick handler.
Ruediger Pluem [Wed, 15 Nov 2006 20:26:10 +0000 (20:26 +0000)]
* Ensure that we do not perform our final operations twice if a second EOS
falls down the chain by accident. Otherwise we are likely to run in a
SEGFAULT. So remove ourselves from the chain.
Ruediger Pluem [Wed, 1 Nov 2006 20:20:42 +0000 (20:20 +0000)]
* Assign rv in the if statement to return the correct error code and
more important an error code at all, as currently APR_SUCCESS is returned
in the error case.
PR: 40865
Submitted by: Andrew Rucker Jones <arjones simultan.dyndns.org>
Reviewed by: rpluem
Ruediger Pluem [Wed, 1 Nov 2006 13:02:25 +0000 (13:02 +0000)]
* Increase the minimum and default value for MCacheMinObjectSize from 0 to 1,
as a MCacheMinObjectSize of 0 does not make sense and leads to a
signal Floating point exception (8) (division by zero) in
memcache_gdsf_algorithm.
Mladen Turk [Sun, 29 Oct 2006 17:05:40 +0000 (17:05 +0000)]
When Servlet container sends AJP body message with size 0, this means that Servlet container has asked for an explicit flush.
Create flush bucket in that case.
Graham Leggett [Fri, 27 Oct 2006 13:28:56 +0000 (13:28 +0000)]
mod_cache: Pass the output filter stack through the store_body()
hook, giving each cache backend the ability to make a better
decision as to how it will allocate the tasks of writing to the
cache and writing to the network. Previously the write to the
cache task needed to be complete before the same brigade was
written to the network, and this caused timing and memory issues
on large cached files. This fix replaces the previous fix for
PR39380.
Graham Leggett [Wed, 25 Oct 2006 13:44:47 +0000 (13:44 +0000)]
mod_cache: Fix an out of memory condition that occurs when the
cache tries to save huge files (greater than RAM). Buckets bigger
than a tuneable threshold are split into smaller buckets before
being passed to mod_disk_cache, etc. PR 39380
Jim Jagielski [Tue, 24 Oct 2006 13:17:29 +0000 (13:17 +0000)]
Once SSLMutex allowed for the setting of both the
locking method and the lockfile location, I never
liked how AcceptMutex was linked to LockFile. This
seemed unnecessary. Much better to have AcceptMutex
do both as well. Plus, now that we will likely see
other modules require a "standard" way of setting
mutexes, why not have Apache provide that as
an API of sorts.
Anyway, LockFile is now depreciated and AcceptMutex
is now SSLMutex-like. We also provide a short
function that "parses" out a mutex parameter
and strips out the mechanism and lockfile location.
AcceptMutex and SSLMutex is this capability.
Jeff Trawick [Mon, 23 Oct 2006 17:18:35 +0000 (17:18 +0000)]
Fix address-in-use startup failure caused by corruption of the list of
listen sockets in some configurations with multiple generic Listen
directives.
The logic in error is that which prunes out generic IPv4 listening
sockets when we already have a v4-mapped generic IPv6 listening
socket for the same port.
Graham Leggett [Sun, 22 Oct 2006 19:11:51 +0000 (19:11 +0000)]
mod_authn_dbd: Export any additional columns queried in the SQL select
into the environment with the name AUTHENTICATE_<COLUMN>. This brings
mod_authn_dbd behaviour in line with mod_authnz_ldap.
Graham Leggett [Sun, 22 Oct 2006 13:31:25 +0000 (13:31 +0000)]
mod_dbd: Key the storage of prepared statements on the hex string
value of server_rec, rather than the server name, as the server name
may change (eg when the server name is set) at any time, causing
weird behaviour in modules dependent on mod_dbd.
Mladen Turk [Sat, 14 Oct 2006 13:34:58 +0000 (13:34 +0000)]
Fix compile warning. The /wd:XXXX is invalid. It should
be /wdXXXX, and since its for VS2005 only use the standard
preprocessor directives instead of that.
This should be backported to 2.2 as well.
Graham Leggett [Thu, 12 Oct 2006 20:52:37 +0000 (20:52 +0000)]
mod_authnz_ldap: Add an AuthLDAPRemoteUserAttribute directive. If
set, REMOTE_USER will be set to this attribute, rather than the
username supplied by the user. Useful for example when you want users
to log in using an email address, but need to supply a userid instead
to the backend.
Jim Jagielski [Thu, 12 Oct 2006 15:53:33 +0000 (15:53 +0000)]
So I'm sitting in Rich's talk and think to myself, it's kind
of stupid that DumpIO always logs at Debug, esp when
you consider that it's likely you'll be doing so
in conjunction with SSL... One Big Log is understating
it! :)
Add DumpIOLogLevel to allow one to change the level...
Graham Leggett [Tue, 10 Oct 2006 22:10:01 +0000 (22:10 +0000)]
mod_disk_cache: NULL fd pointers when closing them, fix missing
close/flush, remove some unneccessary code duplication instead
of calling the right helper in replace_brigade_with_cache().
Graham Leggett [Tue, 10 Oct 2006 21:31:36 +0000 (21:31 +0000)]
sendfile_nonblocking() takes the _brigade_ as an argument, gets
the first bucket from the brigade, finds it not to be a FILE
bucket and barfs. The fix is to pass a bucket rather than a brigade.
Joe Orton [Tue, 3 Oct 2006 11:40:30 +0000 (11:40 +0000)]
When starting a new piped error logger for the main server, ensure
that the new child's stderr is not a pipe to an old piped logger:
* server/log.c (log_child): Add "dummy_stderr" parameter; if set,
duplicate stdout as the stderr for the child.
(open_error_log): Add "is_main" parameter; use dummy stderr for logger
for main server only.
(ap_open_logs, ap_open_piped_log): Adjust for new open_error_log()/
log_child() parameters.
Mladen Turk [Mon, 2 Oct 2006 07:06:24 +0000 (07:06 +0000)]
Cleanup alternate is_connected method.
It works for sure on win32,linux and solaris.
I do not have access to other platforms so can not
verify it works on them.
Mladen Turk [Sat, 30 Sep 2006 11:04:46 +0000 (11:04 +0000)]
Add alternative is_socket_connected implementation.
It works on win32 and linux for sure, so that's why
I put it inside the #ifdef.
Of course something like that needs APR abstraction.
Mladen Turk [Sat, 30 Sep 2006 10:18:48 +0000 (10:18 +0000)]
Add force recovery for balancer.
In case all balancer members were in error state 503
was returned until the recovery timeout expired.
The patch forces recovery in case all balancer members
are in error state regardless of recovery timeout
directive.
This fixes the time gap when 503 was returned and
backend was already up and running.
* Move the tasks of eor_bucket_destroy (status update, transaction logging) to
a cleanup function that is registered with the request pool.
eor_bucket_destroy only destroys the request pool if there is still a request
at this point of time which triggers the call of the cleanup function.
This is needed as the eor bucket could be (and usually is) allocated from
a pool different from the request pool (the connection pool in this case).
This can lead to situations where eor_bucket_destroy is called at a point of
time when the request pool had been already destroyed. But the status update
and the transaction logging rely on the request pool.
In practise this happens with the worker MPM if the client refuses to read
the response from the handler. Then the unsent data (including the
eor bucket) remains in a brigade allocated from the connection pool which
is the parent of the request pool. This brigade is cleaned up during the
cleanup of the ptrans pool in worker_thread. As the request pool gets
destroyed during this cleanup operation *before* the brigade gets cleaned up
eor_bucket_destroy starts the status update and the transaction logging with
a destroyed request pool which leads to a segfault.