Ryan Bloom [Fri, 9 Jun 2000 21:19:52 +0000 (21:19 +0000)]
Remove a bunch of string functions from Apache. These are basically
standard string functions like strstr, strcasecmp, etc that Apache used
to define for platforms that don't have them. These functions and the
feature tests have moved down to APR where they really belong. In doing
this, I am also able to remove a bunch of tests from the Apache configure
process.
Ryan Bloom [Fri, 9 Jun 2000 18:57:16 +0000 (18:57 +0000)]
Remove all occurances of strerror from Apache. ap_strerror works just
fine with standard errno values, and it is more portable. This also allows
me to remove the check for strerror from Apache's configure script.
Andrew Braund's very complete review of the Win32 documentation!
These should have a profound effect on the number of Win32 inquiries
and problem reports.
I will have some minor notes on running as another user, and
using the perl .dsp conversion scripts to add as a seperate
commit later today.
Jeff Trawick [Fri, 9 Jun 2000 14:48:58 +0000 (14:48 +0000)]
The prefork MPM now uses an APR lock for the accept() mutex.
It has not been getting a lock at all recently.
Note: The TPF and SGI folks need to each APR how to get the most
efficient lock on those platforms. (For SGI it depends on whether
or not we're building for SMP.)
Ryan Bloom [Thu, 8 Jun 2000 19:29:40 +0000 (19:29 +0000)]
Cleanup APR header files a bit. Basically, this splits ap_table_t related
functions into their own header file, away from apr_pools.h. At the same
time as I was doing this, I removed a couple of definitions that aren't
used anywhere anymore, like ap_child_info_t.
Ryan Bloom [Thu, 8 Jun 2000 01:47:21 +0000 (01:47 +0000)]
Fix some problems with the time commit. I guess mod_unique_id isn't turned
on by default, which is why my last build's didn't catch this. I'll be
more careful in the future.
Submitted by: Greg Stein
Jeff Trawick [Wed, 7 Jun 2000 12:36:51 +0000 (12:36 +0000)]
Change the mmap() feature test to check only for existence.
The autoconf-provided check used previously fails when the
platform doesn't support MAP_FIXED. Apache doesn't use that
mmap() feature, so we don't want to require it.
Submitted by: Greg Ames
Jeff Trawick [Tue, 6 Jun 2000 22:22:52 +0000 (22:22 +0000)]
Fix a couple of bugs in mod_cgid:
The cgi arguments were sometimes mangled because no terminating '\0' was
added to the arg string passed to the cgi daemon.
The len parm to accept() was not initialized, leading sometimes to an
endless loop of failed accept() calls on OS/390 and anywhere else that
failed the call if the len was negative.
Tweaks: Add some traces for failed socket calls at cgi daemon setup time
(most of which I hit while playing around).
Ryan Bloom [Tue, 6 Jun 2000 21:45:16 +0000 (21:45 +0000)]
Add the resource limiting code back to Apache 2.0. This only works on
Unix because I can't find any other platforms with rlimit. If there are
other platforms that need this code, then some of the code needs to move.
This has just barely been tested, so it could probably use some good
testing.
Jeff Trawick [Tue, 6 Jun 2000 05:58:16 +0000 (05:58 +0000)]
Fix zombie process problem with mod_cgi. This problem was introduced
as part of the "Convert ap_proc_t to a complete type." enhancement.
mod_cgi previously declared a ptr to an ap_proc_t, storage was allocated
by ap_create_process() from the request pool, and the ap_proc_t address
was passed to ap_note_subprocess().
With the "Convert ap_proc_t to a complete type." change, ap_proc_t
lived in autodata, but the address was still passed to
ap_note_subprocess(). When the pool was cleaned up, the ap_proc_t
in autodata had been used for something else, so the contents were
garbage, but pool cleanup needed the contents, especially the os
pid to pass to waidpid(). Since this was garbage, we never reaped
status from the cgi child and thus the cgi child remained a zombie.
Jeff Trawick [Tue, 6 Jun 2000 00:51:20 +0000 (00:51 +0000)]
Fix typo in configure script when checking for mod_so. bash
doesn't seem to have a problem but /bin/sh on Solaris does.
Symptom: "./configure: test: unknown operator =="
Ryan Bloom [Mon, 5 Jun 2000 23:14:35 +0000 (23:14 +0000)]
Remove the ability to enable/disable DSO support in APR. The only current
way to check for DSO support is to look for libdl. Apache automatically
adds -ldl to it's LIBS flag from config.m4 in modules/standard. Other
platforms will need to add the correct flag for their system.
Jeff Trawick [Mon, 5 Jun 2000 20:45:08 +0000 (20:45 +0000)]
Make a copy of getenv("PATH") before storing for later use. Some
getenv() implementations use the same storage for successive calls.
CGIs on OS/390 had a bad PATH due to this. (Believe it or not, ANSI
says getenv() can do this.)
Some similar getenv() usage was left alone as it was specific to a
certain platform, and I assume that getenv() doesn't have the "issue"
on those platforms.
Ryan Bloom [Mon, 5 Jun 2000 19:44:02 +0000 (19:44 +0000)]
Add server tokens back to 2.0. Also bring forward the change to allow
the PRODUCT_ONLY value for ServerTokens. This is relatively clean,
all of the code lives in http_core, and when a module wants to add a token,
they just call ap_add_version_component from the post_config hook. Actually
ap_add_version_component can be done anytime after the config has been
parsed, it just makes the most sense to do it in post_config IMHO.
Ryan Bloom [Mon, 5 Jun 2000 16:51:06 +0000 (16:51 +0000)]
Fix mod_so handling. Basically, if --enable-so or
--enable-some-module=shared is specified on the ./configure line, then
mod_so is included in the build, -ldl is added to LIBS, and --enable-dso is
added to APR's configure line. Otherwise, mod_so is turned off, -ldl is
not added, and APR is specifically told to build without DSO support.
Jeff Trawick [Sun, 4 Jun 2000 19:46:22 +0000 (19:46 +0000)]
mod_cgid:
fix parmlist to ap_open() so that we can open the ScriptLog file o.k.
in log_script(), don't do anything with script_err parm if it is NULL
(for mod_cgid, it is always NULL; rather than simply ripping out such
logic I kept it in case somebody wants to factor out common parts of
mod_cgi.c and mod_cgid.c later)
Jeff Trawick [Sun, 4 Jun 2000 19:27:02 +0000 (19:27 +0000)]
mod_charset_lite:
functional changes:
setup input translation for PUT or POST
other:
bail out more quickly if our dir config says do nothing,
tweak the debug trace,
a few changes that should be in the next announcement. I still think this is
waaaay too corporatespeakish and that we should add more information about
how to get involved with development.
And is it true that we're still particularly less stable on Win32?
Ryan Bloom [Sat, 3 Jun 2000 16:27:03 +0000 (16:27 +0000)]
Modify the config order so that we read the config, process all EXEC_ON_READ
directives at the same time, run pre_config hook for all modules, and
then walk the tree. This allows all modules to have a pre_config hook and
know that it will be called at a reasonable time. I also made "Include"
an EXEC_ON_READ directive so that it is included in the tree properly.
This was required after the other changes that were made.
Jeff Trawick [Fri, 2 Jun 2000 15:55:20 +0000 (15:55 +0000)]
APACHE_XLATE, when doing translation that isn't single-byte-only
We must zap the Content-length header (if any). Otherwise, the
browser will be seriously confused :) The header is zapped in
ap_set_keepalive() right before we look for Content-length, transfer
encoding, HTTP level, etc. to decide, among other issues, whether or
not to turn on chunked encoding. For HTTP 1.1, if we don't send
Content-length, we need to use chunked encoding, so we have to zap
the header before that decision.
Interestingly, in Russian Apache the Content-length header is
zapped after ap_set_keepalive() is called, so with HTTP 1.1 they
break the content-length-or-chunked rule.
Ryan Bloom [Thu, 1 Jun 2000 15:45:18 +0000 (15:45 +0000)]
Fix DSO enabling logic. Basically if --enable-dso was specified on the
command line but the cache had DSO off, we used to turn DSO off. This has
been fixed with this patch. Also, if we specify ANY Apache module as
being compiled shared, then we automatically turn on mod_so.
Ryan Bloom [Thu, 1 Jun 2000 01:01:16 +0000 (01:01 +0000)]
Fix building with DSO support. If any module is configured to be
compiled for shared support then APR_HAS_DSO is enabled and -ldl is
added to the LIBS variable. -ldl may need to be modified based on
platform. If no modules are designated as shared then APR_HAS_DSO is
disabled and nothing is added to LIBS. In basic testing this compiled
without errors or warnings.
Brian Havard [Wed, 31 May 2000 02:30:30 +0000 (02:30 +0000)]
Rework DSO error reporting to be more flexible & informative.
This patch covers os/2, unix & win32. Other platforms still need some
adjustment (BeOS, AIX).
Jeff Trawick [Wed, 31 May 2000 01:35:46 +0000 (01:35 +0000)]
APACHE_XLATE: in ap_send_error_response(), move the setting
of the translation handle to before we process ErrorDocument
strings. The previous placement of this logic only handled
the hard-coded response documents.
When ErrorDocument specifies a redirection, we don't get here.
When the error response is headers only, we don't need to set
the handle for content. Thus, all paths through
ap_send_error_response() should be handled now.
Jeff Trawick [Tue, 30 May 2000 14:20:46 +0000 (14:20 +0000)]
Ensure that the proper translation handle (if any) is used when
sending the canned response document to the client. Otherwise, the
client may get garbage depending on the translation in effect.
Ronald Tschalar [Mon, 29 May 2000 08:57:18 +0000 (08:57 +0000)]
Brought mod_auth_digest up to synch with 1.3, fixed ap_time_t-related
bugs, and changed shmem/locking to use apr API. Shared-mem is currently
disabled, however, because of problems with graceful restarts.
One last precursor to the common code base for Win32 rewrite_args from
it's MPM. Since we need to walk the arg list... why maintain it in
several places. This patch adds the AP_SERVER_BASEARGS definition to
the header, so any mpm (and mod_info, for example) can know what args
are legitimate, even when they plan to ignore them.
Remove any possiblity of having multiple tags to correct as the version
changes. Split httpd.h's version into tokens. Roll these tokens into
registry.c
TODO: Remove registry.c from the list of files to touch when rolling