Greg Stein [Sat, 24 Feb 2001 14:17:25 +0000 (14:17 +0000)]
Shift XML handling code from Apache down into APRUTIL
- teach APRUTIL how to find Expat and respond to --with-expat
- Apache's configure points APRUTIL's configure at its srclib/expat-lite
(this will go away; aprutil can work against installed expats or fallback
to an expat bundled within aprutil)
- shift some of the timing of INCLUDES and top_builddir processing in the
APRUTIL configure.in script
- expose the new apr_xml functions in apr_xml.h, apr_xml.c (by building it),
and apu_compat.h
- rewrite util_xml.[ch] in terms of apr_xml
Greg Stein [Sat, 24 Feb 2001 11:23:31 +0000 (11:23 +0000)]
*) fix inline handling. we had: apr_inline, APR_INLINE, USE_GNU_INLINE, and
INLINE. Now, we just have APR_INLINE and APR_HAS_INLINE.
- convert all usage
- note that apr_general messed up the defn (compared to apr.h)
- simplify the inline decision logic in os/*/os.h
- simplify the code in os/*/os-inline.c
Jeff Trawick [Fri, 23 Feb 2001 11:39:37 +0000 (11:39 +0000)]
Work on a BSD/OS system where GNU make is used instead of the native
make.
Roy suggests using the variable set by AC_PROG_MAKE; we don't use that
yet, though I guess we could. Greg suggests leaving this to Roy since
he will revamp this stuff soon anyway.
Inspired by: Joe Orton's patch to APR to accomplish the same thing
Jeff Trawick [Fri, 23 Feb 2001 03:19:29 +0000 (03:19 +0000)]
Get it to build on FreeBSD by dropping <stropt.h>. (It still
builds on Linux.)
Pass an initialized thread attribute instead of an accidental
autodata value to apr_create_signal_thread(). This should
avoid a segfault. It seemed to behave a little better for me
at this point.
Get rid of some warnings.
gcc on FreeBSD still warns about a few variables that might be
clobbered by longjmp() in worker_thread().
Jeff Trawick [Thu, 22 Feb 2001 21:35:38 +0000 (21:35 +0000)]
get the last worker in a given child initialized properly
by getting a new pool for its own proc_info structure instead
of overlaying the pool in the proc_info structure for the
prior thread
we also move through the SERVER_STARTING scoreboard state for this
worker, though this isn't as important as with the other workers,
for which a new thread must be created (potentially time consuming)
Jeff Trawick [Thu, 22 Feb 2001 18:54:49 +0000 (18:54 +0000)]
Back down the default number of initial threads created with
the threaded Unix MPM. Tweak the sample configuration files to
reflect the default settings.
Jeff Trawick [Thu, 22 Feb 2001 14:22:39 +0000 (14:22 +0000)]
clean up a call to apr_psprintf() (trailing NULL not needed)
previously:
mod_auth_digest.c: In function `set_shmem_size':
mod_auth_digest.c:625: warning: too many arguments for format
Ryan Bloom [Thu, 22 Feb 2001 04:05:58 +0000 (04:05 +0000)]
Add a couple of GCC attribute tags to printf style functions. This also
fixes a couple of mismatched parameters highlighted revealed by the
attribute.
Submitted by: Jon Travis <jtravis@covalent.net>
Ryan Bloom [Wed, 21 Feb 2001 19:07:21 +0000 (19:07 +0000)]
Close the accepted socket before creating the CGI process in mod_cgid.
This is safe, because we have already dup'ed the socket for the CGI
process itself. This change allows CGI processes to fork long-lived
child processes without affecting how quickly the response gets back
to the broswer.
Ryan Bloom [Wed, 21 Feb 2001 17:54:41 +0000 (17:54 +0000)]
Split the mod_dir fixup into two parts. The first determines if this
is a MOVED_PERMANANTLY response, and is done from the fixup. The second
is a handler that redirects to an index.html page.
Ryan Bloom [Wed, 21 Feb 2001 01:04:39 +0000 (01:04 +0000)]
Make mod_dir use a fixup for sending a redirect to the browser.
Before this, we were using a handler, which doesn't make much
sense, because the handler wasn't generating any data, it would
either return a redirect error code, or DECLINED. This fits the
current hooks better.
Submitted by: Ryan Morgan <rmorgan@covalent.net>
Ryan Bloom [Tue, 20 Feb 2001 20:50:09 +0000 (20:50 +0000)]
Migrate the threaded MPM to use all APR threading calls. This isn't quite
perfect yet, because of the sigwait and sigmask calls. Those are going
away next.
Roy T. Fielding [Tue, 20 Feb 2001 02:01:09 +0000 (02:01 +0000)]
Update APR macro usage to new name-protected names.
Replace REENTRANCY_FLAGS with direct use of THREAD_CPPFLAGS.
This is a temporary band-aid, since the way we currently set
the standard make vars (CFLAGS, CPPFLAGS, LDFLAGS, etc.) is
bogus and frequently redundant [to be fixed later].
Greg Stein [Sun, 18 Feb 2001 04:26:13 +0000 (04:26 +0000)]
- more ap_conf_vector_t fixup.
- break out the cmd_parms to ap_set_config_vectors to clarify/doc what is
happening in there and because the function operates independent of cmds.
Greg Stein [Sun, 18 Feb 2001 02:58:53 +0000 (02:58 +0000)]
*) Introduce "ap_conf_vector_t" type to assist with legibility and provide
some type safety. (unfortunately, our old "void*" is type-safe with the
new one, but over time we should be better)
*) Propagate the new type to all appropriate functions.
Ryan Bloom [Fri, 16 Feb 2001 22:08:12 +0000 (22:08 +0000)]
Make the threaded MPM use APR locks instead of pthreads mutexes. This is
the first step towards getting the threaded MPM to rely on APR for all of
it's threading needs.
Martin Kraemer [Fri, 16 Feb 2001 13:38:31 +0000 (13:38 +0000)]
Rename the module structures so that the exported symbol matches
the file name, and it is easier to automate the installation
process (generating LoadModule directives from the module filenames).
Next step is to remove the 4th argument to the APACHE_MODULE macro
completely and require people to use the matching names, and to
reduce the LoadModule directive to 1 argument.... Objections?
Ryan Bloom [Fri, 16 Feb 2001 05:53:41 +0000 (05:53 +0000)]
Remove all instances of apache_apr_flags="--enable-threads" from the
config.m4 files. If we leave those in, then Apache automatically
enables threads for all machines when a threaded MPM is chosen. We want
people to have to force threads for platforms that don't run threads
well (i.e. FreeBSD).
Ryan Bloom [Thu, 15 Feb 2001 19:22:02 +0000 (19:22 +0000)]
Fix the seg fault in mod_status.c. This changes the up_time to an
interval_time. The segfault is caused by apr_vformatter not understanding
%lld, so we also had to change that to %qd, which solves that problem.
Bill Stoddard [Wed, 14 Feb 2001 21:05:36 +0000 (21:05 +0000)]
Fix lingering close (and make it more efficient). We were blocking on
apr_read() for 30 seconds for each lingering close. What we want to
do is block for 2 seconds. If we do not read any bytes from the client
in that time, close the connection. If we do read bytes, then wait 2
more seconds to see if more arrive, etc. Repeat for MAX_SECS_TO_LINGER
if needed.
This should clear the way to get 2.0 running on apache.org!
David Reid [Tue, 13 Feb 2001 20:53:13 +0000 (20:53 +0000)]
This is a huge change that gets beos building again. Essentially it
- tidies up some of the formatting
- gets us working with mod_status
- uses the newer naming I've used in the headers to try and be more obvious
- uses a UDP socket for telling the server when to stop/restart. This isn't
perfect but as pre-BONE we don't have the ability to select on a pipe this
seemed like the next best option. This seems to work well for stopping,
but so far restarts don't. This will need some more security adding to it
I think.
If I ever wanted a lesson in not keeping something on my HDD too long before
committing this update has been it. Really should try and keep up a bit more :)
Ryan Bloom [Tue, 13 Feb 2001 20:30:19 +0000 (20:30 +0000)]
Remove the dexter MPM. This has been replaced with the Perchild MPM.
The two MPMs are basically identical, except that Perchild also allows
each child process to have a unique uid/gid combination.