Bill Stoddard [Sat, 19 May 2001 20:12:05 +0000 (20:12 +0000)]
Reimplement mod_headers as an output filter. mod_headers can now
add custom headers to inbound requests using the HeaderIn directive
and to responses using the HeaderOut directive. The Header
directive has been deprecated in favor of the HeaderOut directive.
Submitted by: Graham Leggett
Reviewed by: Bill Stoddard
We don't want these operations to end the stream, simply flush out
the contents. It's up to any downstream filters to collect c-l or
other stats when the handler has exited.
Jeff Trawick [Thu, 17 May 2001 18:04:18 +0000 (18:04 +0000)]
Fix processing of the TRACE method. Previously we passed bogus
parms to form_header_field() and it overlaid some vhost structures,
resulting in a segfault in check_hostalias().
[Greg Ames, Jeff Trawick]
Note: Not being familiar with the TRACE method I compared the 2.0
output with 1.3.9 output. The only difference is that with 2.0 we
get a Content-Length header field.
Bill Stoddard [Thu, 17 May 2001 12:10:22 +0000 (12:10 +0000)]
Fix a segfault in apr_proc_other_child_unregister. Jeff recently made
a change in APR otherchild.c to unregister all OC registrations as
part of pool cleanup. This means that we must NOT explicitly call
apr_proc_other_child_unregister out of other pool clean-up routines.
In this case, the OC cleanup was being called first then the piped_log_cleanup
was being called which called apr_proc_other_child_unregister.
We could fix this by detecting the case when there are no more OCs registered
in apr_proc_other_child_unregister but that might just mask other problems we
need to fix anyway.
Bill Stoddard [Wed, 16 May 2001 13:49:40 +0000 (13:49 +0000)]
Do not start piped log processes during the config file
preflight. This change also circumvents a problem on
Windows where the rotatelog processes created during preflight
was not getting cleaned up properly.
Jeff Trawick [Tue, 15 May 2001 17:30:44 +0000 (17:30 +0000)]
clean up DSO builds on OS/390 a bit by ignoring some generated files
and by passing libtool the OS/390-specific options needed to split
the main httpd executable into a small executable with main() and a
dll with everything else (previously this information was hard-coded
in the OS/390 libtool program)
Paul J. Reder [Tue, 15 May 2001 02:38:17 +0000 (02:38 +0000)]
Make first phase changes to the scoreboard data structures in
preparation for the rewriting of the scoreboard per my posted
design notes. [Paul J. Reder]
Still some todos: an option to just abort user feedback and close the
window instantly upon loosing the stdin pipe, allow the stdin pipe to
be tee'ed on win32, and still add some graceful error handling for a
real-world deployment.
Q. "Why can't I watch my server's activity?" A. You can.
This is a little tool I dreamed up while fighting a ton of battles on
several fronts. It demonstrates that reliable piped logs on win32 still
need work, that we launch log processes far too many times, and generally
gives admins more blinky lights on win32. But it's too practial of an
example to leave on my hard drive gathering dust.
Note that the support/win32 will be used for really non-unix/non-portable
applications. Perhaps something similiar would be useful all the way
around, and perhaps some of this code can get into the apr core. But for
this moment, it serves a purpose for beta development.
Greg Stein [Sun, 13 May 2001 10:37:06 +0000 (10:37 +0000)]
Implement Jeff's idea for an autoconf-defined symbol to enable the special
command function prototype stuff. AP_DEBUG is always set in maintainer mode
and AP_DEBUG_HAVE_GCC is set when the compiler is GCC.
Jeff Trawick [Sat, 12 May 2001 13:05:27 +0000 (13:05 +0000)]
Only turn on AP_DEBUG if we're using gcc.
The AP_DEBUG flavor of the cmd_func declarations is not portable.
Last night Roy removed the check for gcc before turning on AP_DEBUG.
Interestingly (or not :) ) the AP_DEBUG flavor of cmd_func compiles
cleanly on gcc but the non-AP_DEBUG flavor doesn't. The non-AP_DEBUG
flavor compiles cleanly with Tru64 cc and AIX xlc but the AP_DEBUG
flavor doesn't. (On Tru64 we get a bunch of warnings with the
AP_DEBUG flavor but at least it compiles; the same cannot be said of
AIX xlc.)
Perhaps we should use a symbol other than AP_DEBUG to distinguish
between the cmd_func flavors. Then AP_DEBUG can be turned on
regardless of compiler. The new flag can be turned on for gcc+
--enable-maintainer-mode, or perhaps for gcc always since the non-
AP_DEBUG flavor won't compile cleanly with gcc. (what a mess; this
probably wouldn't work right for different levels of gcc anyway)
Roy T. Fielding [Sat, 12 May 2001 03:48:31 +0000 (03:48 +0000)]
Fix httpd's definition of LTFLAGS to be consistent with that of apr
and apr-util, allow it to be overridden by the configure command-line
(default="--silent") and introduce LT_LDFLAGS to replace what we were
formally abusing as LTFLAGS.
Roy T. Fielding [Sat, 12 May 2001 01:37:27 +0000 (01:37 +0000)]
It is easier to re-run configure's test and pick up the cached values
than it is to replicate them in our own macros. This isn't too expensive
because CC and CPP have already been set by APR. Too bad it generates
a lot of output.
Also, we don't need to repeat command-line options that are already being
handled by APR now that we use APR's generated flags. The switches are
still usable on the command-line.
Roy T. Fielding [Fri, 11 May 2001 18:18:04 +0000 (18:18 +0000)]
The pattern was too general -- it would match the date within the
OpenSSL version string instead of just the version number. Fix it
using a hint from libtool.
Bill Stoddard [Fri, 11 May 2001 17:34:17 +0000 (17:34 +0000)]
Do not send apr_file_t allocated out of the pconf pool down the
filter chain. This is not perfect but better. Need to do some
more work in apr_os_file_put to initialize fields a bit better.
Roy T. Fielding [Fri, 11 May 2001 08:12:06 +0000 (08:12 +0000)]
Simplify the configuration process by moving all libtool stuff to APR
and moving the last bits of hints.m4 inline. Now we only run every
test four times instead of five. One down, three to go.
Chuck Murcko [Fri, 11 May 2001 04:35:41 +0000 (04:35 +0000)]
Add the AP_DECLARE()/AP_CORE_DECLARE macros on the return types of
functions used by mod_proxy for export in DLL
Submitted by: Ian Holsman <IanH@cnet.com>
Reviewed by: Chuck murcko
Roy T. Fielding [Thu, 10 May 2001 01:47:47 +0000 (01:47 +0000)]
Eventually we will want to only find openssl once regardless of how
many modules depend on it, so make the check an autoconf macro.
Note that this still isn't being checked "the autoconf way", but it
is better than what we have now.
I'm not sure about the -R stuff, but I am told that Solaris won't
build without it. This is something that should be tested using
AC_TRY_LINK rather than assuming openssl isn't already on the ld path.
Martin Kraemer [Tue, 8 May 2001 08:54:24 +0000 (08:54 +0000)]
Try to auto-detect the location of the OpenSSL stuff. The old logic was
incorrect anyway (it tested for .../ssl/ssl.h and then used .../include/ssl.h).
Now we have a configurable list of candidates, each with:
a name, an include path, a lib path, and a list of libs.
Roy T. Fielding [Tue, 8 May 2001 04:42:26 +0000 (04:42 +0000)]
When no specific location of openssl is given, we need to check the
places where people install upgraded software first, since otherwise
we will get the older versions installed by the OS distribution. That's
very bad for us because we are requiring a version of openssl that is
more recent than most of the Linux distros.
When finding the openssl helper program, check both the PATH and the default
install dirs, since openssl isn't normally included on a user's path.
Use APR_ADDTO to add to the make macros in order to avoid duplicates.
Jeff Trawick [Mon, 7 May 2001 16:24:14 +0000 (16:24 +0000)]
minor scoreboard/status improvements:
. get the SS field in extended status output formatted correctly
(seconds since beginning of request shouldn't be a huge
negative number :) )
. use APR_OS_PID_T_FMT and pid_t where appropriate in mod_status
to avoid casting, some of which may have been broken on some
architectures
Bill Stoddard [Mon, 7 May 2001 14:03:59 +0000 (14:03 +0000)]
Get mod_cern_meta to work on Windows. The problem was in the
"skip leading slash" logic, which is inheriently broken on Windows
because full Windows filenames begin with a drive letter or UNC
path.
Ryan Bloom [Sun, 6 May 2001 23:27:14 +0000 (23:27 +0000)]
Back out the recent change to ap_get_brigade, to make it use indirection
again. The problem is that the amount of data read from the network,
is not necessarily the amount of data returned from the filters. It is
possible for input filters to add bytes to the data read from the network.
To fix the original bug, I just removed the line from ap_get_client_block
that decremented r->remaining, we allow the http_filter to do that for
us.
Port ssl_util_table.[ch] to Apache 2.0 by just removing all platform
depended code (table_read, table_write). This is possible because this
table library is local to mod_ssl and inside mod_ssl this library is
used for manipulating hash tables inside shared memory segments only. So
we can just get rid of the unportable parts at all.