Now for the major refactoring. Introduce mod_isapi.h, as we have had
untold problems with compatibility between different Visual Studio and
PlatformSDK users [based on their generation of the MS ISAPI header.]
This header is coded from scratch in native APR types.
Replace the apr_array_t with an apr_hash_t, mutex protected, to allow us
to preload and late-load isapi modules. This closes a significant bug
with trafficed sites using uncached isapi modules, where one would be
closing the module just as another request is opening it [as if for the
first time.] This would cause some ISAPI modules to crash. Now that
we load modules for the lifetime of the server, a simple graceful restart
is all that's required to unload all the non-precached modules.
Crack out all FAKE_ASYNC code while we complete it. Total support for
the Completion Context callback and end-of-request termination is required
before we can toggle this on.
My next commit; complete fake async support. But this was all I'd had
in me for one night.
Part 3 of the ISAPI overhaul. Reframe the 'server conf' into 'dir conf'
options, creating one single cache of loaded modules [heck, that's what
it was before.] This allows finer grained control of specific modules
that must be 'configured' around to deal with their peculiarities.
This actually saves much code when we can use global config accessors.
Grant the module cache it's own pool, and straighen up some other nits.
No other substantial changes in this pass.
Instead of hardcoding srclib/apr{-util} in the INCLUDES, get the information
from ap{ru}-config --includes which knows how to deal with VPATH builds
itself.
Part two; nearly inconsequential - Made the log message prefix ISAPI:
(rather than ISAPI with no trailing colon) and normalized some variables
and static fn names to 'apache names' rather than MSisms.
First pass at trying to standardize httpd-2.0's usage of APR and APR-util
so that they can be separated - use an installed APR and APR-util with
httpd-2.0. This is not expected to achieve full separation, but is
merely the first step in the process. The tree should still be buildable
in the source-only case.
This commit does the following things:
- Use the standard find_apr.m4 and find_apu.m4 m4 macro files that flood and
Subversion already use for locating APR and APR-util. This adds the
--with-apr and --with-apr-util configure options.
- Stop using APRVARS and export_vars.sh.
- Use apr-config and apu-config to determine dependencies.
- Add AP_BUILD_SRCLIB_DIRS and AP_CLEAN_SRCLIB_DIRS values (names stink)
to dynamically figure out what subdirs in srclib we will build.
(What we really want to do is set one value - go L->R on build and
R->L on clean. I can't think of a way to do this.)
- If we are using APR and APR-util that are already installed, don't
specify them in srclib. (This still needs some work I bet.)
Considering the overall goal of making APR and APR-util being used
out-of-tree, AP_LIBS can not be a PROGRAM_DEPENDENCY, but just a library
that we link against - therefore, it belongs under PROGRAM_LDADD.
(A program dependency implies that we can build it - that will not
always be the case with APR and APR-util.)
Fix mod_deflate corruption when using multiple input buckets. We should
only clear *_out when we are the beginning or avail_out == 0.
Justin was tracking this down before he went to WWDC and didn't finish
before he left. A (virtual) beer goes to Asada who filed this PR with
the right patch!
Richard Bowen [Sun, 12 May 2002 23:53:42 +0000 (23:53 +0000)]
The suexec arguments now start with --with.
Note that there are also two arguments missing, according to ./configure
--help. Specifically, --with-suexec-bin and --with-suexec-umask. Can I
can add those in, if desired, but if someone more familiar with it could
do so, perhaps it would be a little more descriptive.
Obtained from: #apache on openprojects.net
Jeff Trawick [Thu, 9 May 2002 10:53:28 +0000 (10:53 +0000)]
Fix a mod_ssl build problem on OS/390.
This is admittedly rather ugly code to come up with a unique 4-byte
identifier for the thread. Since our threads are pthreads and a pthread
maps 1:1 to a TCB, the address of the TCB is sufficient. Yes, every
TCB sees a different piece of real storage mapped to the first page,
so the code does make sense.
Use the ap_get_server_xxx() calls to return the info rather than short cutting it with the server_rec. This avoids port showing up as 0 and also respects the UseCanonicalName setting in the .conf file.
Cliff Woolley [Tue, 7 May 2002 22:31:38 +0000 (22:31 +0000)]
Changing *any* default behavior is a bad idea without _very_ careful
consideration, IMO, as it can silently break existing configs. Principle
of least astonishment applies. Besides, the security argument is bubkus.
Security through obscurity at best, and hardly even that.
Jeff Trawick [Tue, 7 May 2002 14:51:32 +0000 (14:51 +0000)]
get "make extraclean" and probably "make distclean" to work on AIX
again... $(RM) isn't defined everywhere (GNU make built-in?), so
invoke rm the way we invoke it elsewhere in the makefile
Martin Kraemer [Tue, 7 May 2002 13:53:17 +0000 (13:53 +0000)]
Fix long-standing typo (as of 1.17 when mod_info was ported to apache-2.0):
The containers would be printed as
<Name ...>
</,Name>
instead of the proper termination
</Name>
(or was it intended?)
PR:
Obtained from:
Submitted by:
Reviewed by:
Add DeflateBufferSize directive to replace hardcoded FILTER_BUFSIZE
definition. Also speeds up ctx init since it takes the buffer and does
a malloc rather than a calloc on it.
Note that this does NOT include the transformation since I can't find a
version of Xerces or Xalan which does not produce major diffs to what
we have checked in. So, we need to standardize on a set of jars -
otherwise, if I were to commit what I get when running build.sh, it'd be
massive. (I'd suggest a tarball of jars on the docs-project site or even
in http://httpd.apache.org/dev/dist somewhere.)
If we determine that we shouldn't be involved in this request, remove
ourselves from the filter chain (so we don't duplicate this path
each time a brigade comes through).
It isn't a fatal condition if there is no lockfile name, so switch from
APR_EINVAL to APR_SUCCESS. (rewritelock_remove already returns SUCCESS in
this case.)
Aaron Bannert [Mon, 6 May 2002 21:00:50 +0000 (21:00 +0000)]
Protect us from this dirty hack that gets SysV Sem working again
on mod_rewrite. This, along with the original usage of a unix-only
function in mod_rewrite, is a temporary stopgap measure designed only
to workaround limitations in APR's handling of permission attributes.
It shall be removed as soon as that interface is improved.
Jeff Trawick [Mon, 6 May 2002 18:47:22 +0000 (18:47 +0000)]
Get proxy CONNECT basically working (IE seems to be happy with secure
connections).
The to-do of fixing client I/O so it goes through the filters still
remains. But it will be nice if it will work until somebody gets
around to doing that.
Aaron Bannert [Mon, 6 May 2002 18:24:03 +0000 (18:24 +0000)]
Fix mod_rewrite hang when APR uses SysV Semaphores. Before we were
silently failing when locking/unlocking the mutex, since httpd
child processes didn't have permissions to access the root-created
semaphore.
Cliff Woolley [Mon, 6 May 2002 09:11:50 +0000 (09:11 +0000)]
cleanup old-school backward uses of APR_BRIGADE_CONCAT to use
APR_BRIGADE_PREPEND instead, plus optimize away a bunch of repetitive
brigade destructions/creations by hanging onto ctx->saved even after
we empty it out.