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.
Ryan Bloom [Fri, 22 Dec 2000 23:43:16 +0000 (23:43 +0000)]
If we get EAGAIN returned from apr_sendfile, then we need to loop back and
call it again. This change allows us to serve large files (such as
apache_2.0a9.tar.gz) using Apache 2.0 on FreeBSD.
Greg Stein [Fri, 22 Dec 2000 22:44:45 +0000 (22:44 +0000)]
Back out the .libs thing from the aprutil linking. Add --disable-shared (for
now) to the subdir config to ensure that we only get a static library for
aprutil (which allows for linking all of its functions into the executable).
[ APR will need something similar if/when it gets libtool-ized ]
Mark a note in STATUS indicating we should eventually toss the
--disable-shared flag.
Ryan Bloom [Fri, 22 Dec 2000 00:02:52 +0000 (00:02 +0000)]
Cleanups so that the support programs build cleanly. The Win32 values
need to be sanity checked.
Submitted by: Cliff Woolley <cliffwoolley@yahoo.com>
Reviewed by: Ryan Bloom
Out of the sandbox and into prime time. Note... these should always and
only be regenerated immediately prior to the tag and roll. Do not assume
they are current with the sources in the development tree. They should
be generated as vc5 make files, since only vc5 makefiles are readable by
both vc5 and vc6.
Back out the target path change from serverroot\bin back to serverroot
for Apache.exe and it's associated lib*.dll files until after beta one.
Change the make projects as well... and a commit of the actual .mak files
will be coming in a moment.
Ryan Bloom [Thu, 21 Dec 2000 01:27:46 +0000 (01:27 +0000)]
Actually link apr-util's .a file, instead of relying on libtool. We may
want to change this later, but right now, we want a single binary that
has every function it requires.
The Win32 overhaul, in summary;
Modules are named mod_foo.so
Dynamic Libraries are named libfoo.dll, and are stored in bin/
The former ApacheCoreDll is now libhttpd.dll
Apache.exe moves to bin/
The make install now copies include, lib, and libexec
All build options are normalized, filenames adjusted appropriately
Ryan Bloom [Wed, 20 Dec 2000 23:48:06 +0000 (23:48 +0000)]
This is about 99% complete for the binbuild script. The only problem that
still remains is that some of the apr-util functions aren't being compiled
in, so they work when the apr-util library is in the right location, but
once that library is removed, the server won't start.