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
Jeff Trawick [Sun, 28 May 2000 11:48:24 +0000 (11:48 +0000)]
mod_cgi: Restore logging of stderr from child process when ScriptLog
isn't used (as in 1.3), except that on Unix it is now logged via
ap_log_rerror() instead of by the child having STDERR_FILENO refer
to the error log.
Submitted by: Greg Ames
Reviewed by: Jeff Trawick
Kill the Win32 library project ap.dsp and slide http_main.c from the
ApacheCore.dsp into Apache.dsp - this is in prepartion of the real
services update, which will move registry.c and service.c back into
ApacheCore.dsp, kill both headers and incorporate their symbols into
the mpm/winnt/winnt.h file. main_win32.c will die as well, with it's
few remaining functions moving into the mpm.
/D(efine) STATIC to suppress warnings since pcreposix is statically
linked to pcre. ApacheCore would have to be touched as well, except
that we don't override pcre_malloc or pcre_free. If we do so, the
STATIC symbol is too broad, and aught to be changed in Apache's
public src/include/pcre.h headers.
Cleanup MSVC .dsp build for support/ files. Give all support/ .dsp's
the GCD configuration. The entire Win32 environment now builds, but
I'm sure that will be fixed soon :-)
Prevent the .dsp project files from being touched if they were
already cleanly converted. Note that just loading the 6.0 .dsp
in the 5.0 MSVC environment doesn't toggle the /ZI->/Zi option.
Cleaning up. Note that apache (or https) -D DEFINE is now enabled, the
shared data is now properly moved to either ap_hooks.c or http_config.c,
and all should be well with rewrite_args.
Next stop, no more apache_main entry point. That's why this file needs
to be empty of any callbacks or shared data, as it will bind to the core
but the core won't be looking back into http_main.
Pass the process_rec to the MPM to allow rewriting of the args list.
Especially necessary under Win32, or other non-unix front ends where
oddball arguments might be required, but without causing a mess in
http_main.c.