Jeff Trawick [Tue, 7 May 2002 14:51:32 +0000 (14:51 +0000)]
get "make extraclean" and probably "make distclean" to work on AIX
again... $(RM) isn't defined everywhere (GNU make built-in?), so
invoke rm the way we invoke it elsewhere in the makefile
Martin Kraemer [Tue, 7 May 2002 13:53:17 +0000 (13:53 +0000)]
Fix long-standing typo (as of 1.17 when mod_info was ported to apache-2.0):
The containers would be printed as
<Name ...>
</,Name>
instead of the proper termination
</Name>
(or was it intended?)
PR:
Obtained from:
Submitted by:
Reviewed by:
Add DeflateBufferSize directive to replace hardcoded FILTER_BUFSIZE
definition. Also speeds up ctx init since it takes the buffer and does
a malloc rather than a calloc on it.
Note that this does NOT include the transformation since I can't find a
version of Xerces or Xalan which does not produce major diffs to what
we have checked in. So, we need to standardize on a set of jars -
otherwise, if I were to commit what I get when running build.sh, it'd be
massive. (I'd suggest a tarball of jars on the docs-project site or even
in http://httpd.apache.org/dev/dist somewhere.)
If we determine that we shouldn't be involved in this request, remove
ourselves from the filter chain (so we don't duplicate this path
each time a brigade comes through).
It isn't a fatal condition if there is no lockfile name, so switch from
APR_EINVAL to APR_SUCCESS. (rewritelock_remove already returns SUCCESS in
this case.)
Aaron Bannert [Mon, 6 May 2002 21:00:50 +0000 (21:00 +0000)]
Protect us from this dirty hack that gets SysV Sem working again
on mod_rewrite. This, along with the original usage of a unix-only
function in mod_rewrite, is a temporary stopgap measure designed only
to workaround limitations in APR's handling of permission attributes.
It shall be removed as soon as that interface is improved.
Jeff Trawick [Mon, 6 May 2002 18:47:22 +0000 (18:47 +0000)]
Get proxy CONNECT basically working (IE seems to be happy with secure
connections).
The to-do of fixing client I/O so it goes through the filters still
remains. But it will be nice if it will work until somebody gets
around to doing that.
Aaron Bannert [Mon, 6 May 2002 18:24:03 +0000 (18:24 +0000)]
Fix mod_rewrite hang when APR uses SysV Semaphores. Before we were
silently failing when locking/unlocking the mutex, since httpd
child processes didn't have permissions to access the root-created
semaphore.
Cliff Woolley [Mon, 6 May 2002 09:11:50 +0000 (09:11 +0000)]
cleanup old-school backward uses of APR_BRIGADE_CONCAT to use
APR_BRIGADE_PREPEND instead, plus optimize away a bunch of repetitive
brigade destructions/creations by hanging onto ctx->saved even after
we empty it out.
Rewrite ap_byterange_filter so that it can work with data that does not
have a predetermined C-L - such as data that passes through mod_include.
Previously, these requests would generate 416 since when the byterange
filter ran, r->clength would be 0. r->clength is only guaranteed to
be valid after C-L filter is run, but we need C-L to run after us so
that our data can have a proper C-L returned. So, we need to rearrange
the code so that we can deal with this case.
Highlights:
- Remove r->boundary since it is possible to have this self-contained in
boundary's ctx. (May require MMN bump?)
- Remove call to parse_byteranges in ap_set_byterange since this would
wrongly return -1 for dynamic responses. We have to wait until we
see EOS to call parse_byteranges.
- Move bound_head computation inside the num_parts == 2 check.
- Change a NULL brigade check to APR_BRIGADE_EMPTY
- Move the 416 error return to after we've run through all ranges and
found none of them to be valid.
Cliff Woolley [Mon, 6 May 2002 03:10:24 +0000 (03:10 +0000)]
Added an optional function (ap_register_rewrite_mapfunc) which allows
third-party modules to extend mod_rewrite's "int:" internal RewriteMap
functionality.
Cliff Woolley [Mon, 6 May 2002 01:10:24 +0000 (01:10 +0000)]
grr... mod_mem_cache didn't take kindly to that constness fix. So I'm
reverting it and will just have to live with the warning for now. FirstBill,
what's The Right Way to fix this? Should we drop all the const qualifiers
in there, or should cache_hash_set() return a const void * and mod_mem_cache
should cast away the const, or what?
Cliff Woolley [Sun, 5 May 2002 22:28:03 +0000 (22:28 +0000)]
Fix compile break:
mod_mem_cache.c: In function `cleanup_cache_mem':
mod_mem_cache.c:251: too many arguments to function `cache_hash_first'
make[4]: *** [mod_mem_cache.slo] Error 1
Bill Stoddard [Sat, 4 May 2002 19:54:39 +0000 (19:54 +0000)]
Introduce a dedicated cache hash adt that does not rely on pools. This
cures a storage leak when garbage collecting expired entries out of the
hash table. cache_hash is just apr_hash with some of the function removed
and reimplemented to use malloc/free in place of apr_pool calls.
We can't specify it in DISTCLEAN_TARGETS because it is a directory.
Perhaps we could modify DISTCLEAN_TARGETS to delete dirs too, but
that's outside the scope of what Thom (or I) want to deal with now.
Submitted by: Thom May <thom@planetarytramp.net>
Reviewed by: Justin Erenkrantz
By using _setn instead of _set, this call is setting a pointer to a stack variable
in the hash entry. Once initialize_module() returns, the key pointer in the
hash entry is invalid. This causes a fault the next time that the hash entry
key is checked. Calling the _set() version will store a copy of the key which
has the same lifetime as the hash table entry.
Brian Pane [Thu, 2 May 2002 03:19:44 +0000 (03:19 +0000)]
Performance fixes:
* eliminate some copying of sub-parts of the content type in analyze_ct()
* take advantage of the fact that we know the lengths of those sub-parts
in find_ct() to avoid having to recompute their length for concatenation
The charset handling code needs the same type of optimization eventually.
Paul J. Reder [Wed, 1 May 2002 19:28:52 +0000 (19:28 +0000)]
Fix a case where an invalid pass phrase is entered and an
error message is given, but the prompt is not shown again.
This left the user in an ambiguous state.
Bill Stoddard [Wed, 1 May 2002 15:06:44 +0000 (15:06 +0000)]
Defer starting the listener until we have at least tried to start all the worker
threads. We want to get the workers in the pool of available threads ASAP
to keep perform_idle_server_maintenance from thrashing and starting too
many processes prematurely. The code before this patch would dribble workers
into the worker pool over an extended period of time and this prevented
perform_idle_server_maintenance from accurately deciding when new processes
were needed.
Readjusting how the bucket alloc is done for each worker thread. Allocate
the bucket once per thread rather than on every request. This change
increases our performance significantly.
SHMCB should not have been using apr_rmm -- it was doing so incorrectly,
for one thing. But it just plain doesn't need it. Rip it out to avoid
segfaulting.
Bill Stoddard [Tue, 30 Apr 2002 03:25:12 +0000 (03:25 +0000)]
Enable mod_mem_cache to be configured to cache open file handle using new
directive option: CacheEnable fd / will enable caching fds. If for some
reason the fd cannot be cached, the directive will effectively morph into
CacheEnable mem /