Ryan Bloom [Tue, 9 Jan 2001 19:28:33 +0000 (19:28 +0000)]
Fix a compile break with the new APR libtool setup. Basically, we are
using a libtool library from MM, but it isn't getting linked into the
Apache executable, so we fail the link stage. This makes APR
publicize the libtool libraries that it uses, so that Apache can link
them in.
Ryan Bloom [Sun, 7 Jan 2001 05:51:23 +0000 (05:51 +0000)]
Stop leaking sockets. This is a minimal leak, but it was there.
Basically, we were creating a socket_t, but never assigning a port or
IP address to it. We then re-read the config file, and search the
list of allocated sockets for the socket that we have already allocated
for this port, but we never find the port and address, because we never
stored them in the socket_t. This was keeping the Listen directive from
working properly.
dgaudet [Sat, 6 Jan 2001 21:47:49 +0000 (21:47 +0000)]
- add some missing distclean targets
- use DISTCLEAN_TARGETS and CLEAN_TARGETS everywhere (to be consistent
with other macros and with APR)
- warn that aclocal.m4 is a generated file
Ryan Bloom [Sat, 6 Jan 2001 20:10:55 +0000 (20:10 +0000)]
Move ap_generic_hook from the Apache include directory to the apr-util
include directory. The hooks themselves are implemented by apr-util,
instead of Apache. This removes a few warnings when compiled in
maintainer-mode that have been bothering me.
David Reid [Sat, 6 Jan 2001 14:23:14 +0000 (14:23 +0000)]
This file needs to be renamed from config.m4 to config5.m4 to allow
the ordering to work correctly otherwise it breaks the build. It didn't
seem possible to move the file in CVS so I've added a new copy and
deleted the original. It's such a simple file if we don't have the history
it's not an issue!
Ryan Bloom [Fri, 5 Jan 2001 19:40:05 +0000 (19:40 +0000)]
Stop copying file names that we get from apr_file_t's and apr_dir_t's.
We copy the data when we store it in the structures, we can just return
a pointer from there, and use const data. This puts the onus back on
Apache to copy the data if it needs to modify it.
Ryan Bloom [Tue, 2 Jan 2001 17:57:42 +0000 (17:57 +0000)]
Change a bunch of mallocs in mod_cgid to apr_palloc. These were never
getting freed, and using malloc. This was safe, because we were in
the CGID process, but pools are just safer here.
Ryan Bloom [Tue, 2 Jan 2001 01:34:05 +0000 (01:34 +0000)]
Modify a couple of calls to ap_log_error with a NULL server to use
ap_log_perror, and pass a pool. The keeps us from seg faulting if the
error log hasn't been opened yet.
Ryan Bloom [Mon, 1 Jan 2001 00:34:25 +0000 (00:34 +0000)]
We never use MMAP_SEGMENT_SIZE, and we are better off determining if we
have MMAP, by just checking with APR, instead of using an Apache
definition which doesn't really control anything anymore.
Ryan Bloom [Mon, 1 Jan 2001 00:13:41 +0000 (00:13 +0000)]
When we are starting the server, we have a pool that can be used to open
the error log. Rather than try to log a regular error, log an error with
the pool that we have, so that we can open stderr successfully.
Ryan Bloom [Sun, 31 Dec 2000 23:41:07 +0000 (23:41 +0000)]
We have a pool in this function, and log_error_core needs a pool in order
to open stderr successfully. By using ap_log_perror, we can pass a valid
pool down to log_error_core
Greg Stein [Sun, 31 Dec 2000 08:10:19 +0000 (08:10 +0000)]
*) simplify config file list construction (especially the second sed
expression).
*) comment extensively.
*) process into lines which are always guaranteed to sort properly -- don't
rely on sort switches or whether "" sorts (numerically) less than "1".
Ryan Bloom [Sat, 30 Dec 2000 18:20:03 +0000 (18:20 +0000)]
Find all config.m4 files when building generated_lists. Also, convert
the sort to use 'sort -n -b'. These arguments are specified by single
unix, so they should be portable. This restores the ability to order
the config.m4 files.
Submitted by: Dale Ghent <daleg@elemental.org>
Jeff Trawick [Sat, 30 Dec 2000 14:39:15 +0000 (14:39 +0000)]
Get rid of the "-g" on sort.
With GNU sort 2.0 (which ships with Mandrake 7.2), the -g makes
a difference in the sinclude order (which I assume is an intended
difference which I have just broken).
With GNU sort 1.2 (which ships with RedHat 6.0), the -g is accepted
but is not documented and makes no difference in the result. Thus
systems with GNU sort 1.2 were broken before and are still broken
with respect to the order of the sinclude statements.
With OS/390, Tru64, Solaris, and now I think AIX, -g was not accepted
at all by sort so the output of this was broken and Apache would not
build.
Ryan Bloom [Thu, 28 Dec 2000 06:08:30 +0000 (06:08 +0000)]
We don't want to install CVS files, but the -P option to cp means something
different on FreeBSD than it means on Linux. This puts the recursive
copy back in, and just has us delete the CVS directories after they are
copied into place.
Ryan Bloom [Thu, 28 Dec 2000 01:14:22 +0000 (01:14 +0000)]
Ignore CRLF (or LF) when PEEK'ing at data on the socket. The general
problem is that some browsers send an extra line at the end of a POST
request. We use the PEEK method to determine if there is any data left
on the socket, if there is then we delay sending the response until we
have enough data to make it worthwhile. If the browser sends an extra
blank line, we don't want to delay the response at all. The only time
we use the PEEK method is to check for a second request, so this is safe
to do.
This also solves Joe Orton's problem of specifying a Content- Length
of 1 for a blank line, and having the server wait to send back a response.
The problem is that Linux (all Unix really) sends two characters \r\n for
a blank line, so specifying a C-L of 1 means that the server still sees
a \n when it PEEKs that the socket data. That \n can be safely ignored
however.
Ryan Bloom [Wed, 27 Dec 2000 23:30:07 +0000 (23:30 +0000)]
On Unix, we do not want to use an absolute path for CGI scripts. SuEXEC
will not let us use one, and when not using SuEXEC, we chdir() into the
correct directory.
Ryan Bloom [Wed, 27 Dec 2000 23:24:53 +0000 (23:24 +0000)]
We cannot set the SUEXEC_BIN directory from autoconf, because all of the
instructions say that in order to modify this variable, you have to modify
httpd.h
Ryan Bloom [Tue, 26 Dec 2000 21:39:35 +0000 (21:39 +0000)]
Allow buildconf to find the config.m4 files in the correct order. This
allows the decisions made in one config.m4 file to be based on decisions
made in previous config.m4 files. For example, the config.m4 in the
generators config.m4 can choose the correc cgi module based on which MPM
is chosen.
To do this, we find all filenames config*.m4, and then we re-order the
filename so that it looks like: *config.m4/path/to/file. Once all files
are in this format, we sort the files, and then re-arrange the file names
again to put them in the correct order. There may be better ways to do
this, but I couldn't find a portable way to call sort so that this would
work.
Ryan Bloom [Sat, 23 Dec 2000 07:09:01 +0000 (07:09 +0000)]
Get mod_cgid to use apr calls for creating the actual CGI process.
This also allows mod_cgid to use ap_os_create_priviledged_process,
thus allowing for SuExec execution from mod_cgid. Currently, we do
not support everything that standard SuExec supports, but at least
it works minimally now.