Ryan Bloom [Fri, 7 Jul 2000 17:35:41 +0000 (17:35 +0000)]
Initial version of the mpmt MPM. This MPM can emulate dexter, mpmt_pthread,
and prefork. This basically just combines a lot of common code. This
builds and serves pages in all three modes, but I don't think killing
the server works in any of them. The configuration system hasn't changed
at all, so using --with-mpm=(prefork|dexter|mpmt_pthread) all work.
My goal is to remove the three separate MPMs in a few days, and then work
on merging one of the BeOS and the OS/2 MPMs into this as well. :-)
do the "get resource" via a hook rather than through the repository hook
structure. once the resource is retrieved, then we have the relevant
repository hooks and can dispatch through those.
some additional tweaks to use lockdb->hooks rather than fetching them
Bill Stoddard [Fri, 7 Jul 2000 02:39:00 +0000 (02:39 +0000)]
This patch fixes several problems with mod_file_cache
- Pool usage problem
- SIGSEGVs when both MMapFile and CacheFile directives are present. The fix combines
the cleanup routines and only cleans up resources when appropriate.
- Log sendfile errors.
Submitted by: Greg Ames
Reviewed by: Bill Stoddard
Jeff Trawick [Thu, 6 Jul 2000 21:25:19 +0000 (21:25 +0000)]
Fix the way that ap_rwrite() checks for an error from ap_bwrite().
A dropped connection could cause a loop in ap_send_mmap() (and probably
a few other places) because of this problem.
Bill Stoddard [Thu, 6 Jul 2000 17:48:41 +0000 (17:48 +0000)]
Temporarily disable lingerling close until I can get the sendfile path right.
This avoids a seg fault when we try to shutdown then close a socket that has
been reset by the client.
Ryan Bloom [Thu, 6 Jul 2000 00:09:48 +0000 (00:09 +0000)]
Fix make distclean and make clean. Before this commit, we only cleaned
directories that have been configured by the last call to ./configure.
This means that if somebody does ./configure --with-mpm=dexter;make and
then ./configure --with-mpm=prefork;make and then make distclean, dexter
doesn't get cleaned up. Same thing goes for clean.
All this does is with distclean and clean, after we have recursively
gone through the tree to clean everything, we do a quick find to get all
of the left-over Makefiles. Then we just do the same operation on those
directories.
Bill Stoddard [Wed, 5 Jul 2000 19:40:39 +0000 (19:40 +0000)]
Allocate iols out of the ptrans pool rather than mallocing them out
of the heap. The extra malloc/free is a significant performance
hit on some platforms and repeatedly alloc/freeing small chunks of storage
can fragment the heap.
Jeff Trawick [Wed, 5 Jul 2000 18:52:57 +0000 (18:52 +0000)]
Get rid of some warnings in mod_file_cache by moving to the
new command-handler initialization macros.
Submitted by: Greg Ames
Reviewed by: Jeff Trawick
Jeff Trawick [Wed, 5 Jul 2000 18:44:37 +0000 (18:44 +0000)]
struct a_file needs field mm to compile at all when
APR_HAS_MMAP is defined
check for APR_HAS_SENDFILE around the declaration of
file; most of the other sendfile logic does this already
Submitted by: Greg Ames
Reviewed by: Jeff Trawick
Ryan Bloom [Wed, 5 Jul 2000 18:01:52 +0000 (18:01 +0000)]
Remove some warnings from the latest compile. I don't know why these
haven't turned up before. We were using the wrong types in our printf
calls for times.
This updates mod_dav for the util_xml changes posted previously:
* dav_xml -> ap_xml, and dav_text -> ap_text renaming
* Add 'dav_elem_private' to hook mod_dav-specific info up to the
parsed XML tree. Initialize this in several places, I think I got
all necessary? [gjs: yes, you did]
* Removal of the old "gross_hack", and all the XML code that was
moved into util_xml
Submitted by: Joe Orton <joe@orton.demon.co.uk>
Reviewed by: Greg Stein
This patch is a first pass at making util_xml.c independent of mod_dav:
* Rename dav_* to ap_xml_* for exported interface
* Remove dav_* from private functions
* Move text_header handling in from dav/main/util.c
* Move XML tree -> text conversion in
* Add include/util_xml.h header from parts of mod_dav.h
Submitted by: Joe Orton <joe@orton.demon.co.uk>
Reviewed by: Greg Stein
re-enable the "move by rename" optimization (now that we have the
ap_finfo_t.device field)
re-enable the "executable" live property (now that we have a chmod()
equivalent in ap_setfileperms())
misc const cleanups and others issues found using maintainer-mode
(initial errors found by Ryan Bloom).
also switch to use new command table initializer macros.
run DAV's type_checker first so that it can grab the non-GET methods (it
will pass thru GET for normal processing)
fix the DBGn() macros for Apache 2.0
filter out the warning that AC_TRY_RUN gives us while running the
AC_C_BIGENDIAN macro. we've already handled the cross-compile case,
so we don't need to see the message
config magic for enabling DAV, Expat, and SDBM.
*) AP_LIBS contains the target .a files from src/lib/
*) AP_LIB_DIRS contains add'l directories (besides pcre and apr) that we
will build (and generate Makefiles for)
*) apache_need_expat and apache_need_sdbm are two new configure feature
macros; set by the DAV stuff as needed
*) hackery to deal with dav/fs/ since it isn't really a module
*) do endian testing, so we can feed it into Expat to optimize that code
Ryan Bloom [Fri, 30 Jun 2000 21:18:26 +0000 (21:18 +0000)]
Remove ap_get_server_conf() from the MPM's that implement. The only place
this function was ever called was inside the MPM's, and not all of the
MPM's actually had the function. This is part of another round of common
code clean-up.
Ryan Bloom [Fri, 30 Jun 2000 19:57:49 +0000 (19:57 +0000)]
Fix the problem with ./buildconf not working right out of CVS. The
general problem, is that we were using AC_CONFIG_AUX_DIR_DEFAULT, which
the autoconf source says shouldn't be called directly. It should be
called using AC_REQUIRE, but I couldn't make that work. So, since we know
exactly where the files that we are looking for are located, we'll just
point autoconf directly to them, and ignore all of the hoops. :-)
I am not convinced the AC_CONFIG_AUX_DIR(.) call that I am using is
strictly necessary, but it doesn't cause any problems and it logically
makes sense.
Ryan Bloom [Fri, 30 Jun 2000 18:08:13 +0000 (18:08 +0000)]
Combine some common code. Before this, all platforms implemented their
own iol_sockets using APR. This just combines all of that code to a
common file and moves that file to main. I have tested this with all of
the Unix MPM's, but I am willing to bet I missed something (Makefiles) for
Windows, and possibly moving some code for OS/2 and BeOS.
Ryan Bloom [Fri, 30 Jun 2000 14:45:15 +0000 (14:45 +0000)]
I am removing my veto and stepping away from this discussion for at least
two days. This does NOT mean I like the patch at all, it just means I have
no desire to continue with this discussion right now. Because I have no
plans to respond to any more e-mail on the topic currently, I have no right
to veto a patch.
Ryan Bloom [Wed, 28 Jun 2000 16:55:45 +0000 (16:55 +0000)]
Remove the config stuff from the STATUS file. I believe the configuration
in 2.0 is as clean as it's going to get now. Most of the cruft has been
removed. Any more changes that are needed to make the configure system
work can easily be added within the current configuration framework.
Also, update CHANGES to reflect the recent changes to the config system.
Ryan Bloom [Wed, 28 Jun 2000 16:31:02 +0000 (16:31 +0000)]
Finish the Configuration cleanup. This basically merges all of the
autoconf scripts that APR provides for other programs into apr_common.m4.
Other programs can then just include that file to get the APR checks that
are required.
Submitted by: Sascha Schumann <sascha@schumann.cx>
Greg Stein [Wed, 28 Jun 2000 08:55:58 +0000 (08:55 +0000)]
initial checkin of the new Apache DAV code. this is a pristine copy of
mod_dav 1.0.1 (tag "V1_0_1" in the mod_dav CVS repository).
For historical information about these files, see the (old) mod_dav web
site at http://www.webdav.org/mod_dav/. CVS repository information can
be located from those pages.
Hook functions aren't translated (and when they are, they are _NONSTD)...
but you don't need to export a function you will pass by ref to a
register hook function.
Ryan Bloom [Tue, 27 Jun 2000 23:12:23 +0000 (23:12 +0000)]
Fix the configure process. This does a couple of things to allow APR and
Apache to share information.
1) Move the calling of APR after Apache decides which MPM is run, but
before Apache generates the Makefiles and related files. This allows
Apache to setup the threading cache values, while still allowing APR
to generate APRVARS in time for Apache to use it.
2) Setup the cache files correctly for RUN_NOW configured subdirectories.
Bill Stoddard [Tue, 27 Jun 2000 22:39:13 +0000 (22:39 +0000)]
Fix another compiler warning. Forgot to commit this one along with the
earlier patch. Sorry...
Submitted by: Victor Orlikowski
Reviewed by: Bill Stoddard
Ryan Bloom [Tue, 27 Jun 2000 22:35:53 +0000 (22:35 +0000)]
Pass the configure args to sub_configure scripts with the RUN_NOW macro.
This allows people to specify --disable-threads on Apache's configure
command line, and APR respects it. This is the first step to fixing a
problem introduced by making Apache call APR's configure script before
making any config decisions.
Ryan Bloom [Tue, 27 Jun 2000 22:25:12 +0000 (22:25 +0000)]
Use libtool to compile instead of cc. If we are going to use libtool,
we may as well go all the way.
Submitted by: Hubert Feyrer <feyrer@rfhs8012.fh-regensburg.de>
Reviewed by: Ryan Bloom
Jim Jagielski [Tue, 27 Jun 2000 21:28:31 +0000 (21:28 +0000)]
One bug and one fluff: need to use the '.' shell ``command'' to
source the file; and remove error message first time APR's
configure is run, and APRVAR doesn't exist.
PR:
Obtained from:
Submitted by:
Reviewed by:
Jim Jagielski [Tue, 27 Jun 2000 21:16:52 +0000 (21:16 +0000)]
Make sure to get the required vars for the config.guess/et.al. family
first. Right now, this is semi-duplicated, since APR does the same.
PR:
Obtained from:
Submitted by:
Reviewed by:
Ryan Bloom [Tue, 27 Jun 2000 20:25:46 +0000 (20:25 +0000)]
Fix the configure script. If a either the mpmt_pthread or dexter MPM's
are chosen, the default CGI module is mod_cgid. If any other MPM is
chosen, mod_cgi is the default. I would rather have the maintainers for
other platforms change their own defaults, than make mod_cgid the default
on all threaded MPM's.
Ryan Bloom [Tue, 27 Jun 2000 20:06:21 +0000 (20:06 +0000)]
Detect libraries based on which platform configure is being run on.
Basically, Apache now runs APR's configure script first. APR's configure
script has been setup to create a new file, APRVARS. APRVARS is basically
all of the environment variables that APR wants to export to the program
that is using it. This allows the calling program to "source" APRVARS
and get those environment variables.
Jeff Trawick [Mon, 26 Jun 2000 20:37:49 +0000 (20:37 +0000)]
Remove const from ap_socket_t parameters on APR functions so that
APR can modify the ap_socket_t as it sees fit. It may choose to
modify the ap_socket_t on functions which only read from the ap_socket_t
conceptually.
Note: http_connection::ap_new_apr_connection() passes its ap_socket_t
arg to one of the changed functions, so const was removed there also.
David Reid [Mon, 26 Jun 2000 13:26:22 +0000 (13:26 +0000)]
Large tidy up of the beos mpm. this brings in a lot of the changes that
have been made to dexter and mpmt_pthread and adds more support for graceful
restarts.
Ryan Bloom [Sat, 24 Jun 2000 19:31:42 +0000 (19:31 +0000)]
Fix a couple of const warnings on Linux. This basically just defines
ap_strstr and ap_strstr_c, which make sure that things are const when
they need to be.
Greg Stein [Sat, 24 Jun 2000 16:27:47 +0000 (16:27 +0000)]
http_request.[ch]:
*) add the "install_filter" hook as a hook/control point for modules to
install their filters. [Ryan Bloom]
http_protocol.c:
*) move check_first_conn_error() up in the file; no actual changes
*) add checked_bputstrs(), checked_bflush(), and checked_bputs(). These are
copies of ap_rvputs(), ap_rflush(), and ap_rputs() respectively. The
users of the checked_* functions will be independent of filtering changes
to the ap_r* functions.
*) add flush_filters() place holder
Jeff Trawick [Sat, 24 Jun 2000 16:14:11 +0000 (16:14 +0000)]
Bug fix:
. check proper error variable when handling errors from ap_write(pipe_of_death)
. log proper error variable after ap_poll() failure
. ditto for ap_create_pipe() failures
. ditto for ap_set_pipe_timeout() failures
Stylistic change:
. pass 0 instead of errno to ap_log_error when APLOG_NOERRNO is specified