Bradley Nicholes [Thu, 28 Feb 2002 16:57:57 +0000 (16:57 +0000)]
Logging module for NetWare that implements log rotation. This solves the
log rotation problem for NetWare since the NetWare OS does not support
pipes and can therefore not use the RotateLog utility.
Bill Stoddard [Tue, 26 Feb 2002 14:25:56 +0000 (14:25 +0000)]
Win32: Emulate the blocking send/recv calls that were called in these functions
when the timeout was set to 0. This is a bit of a hack but it is an improvement
over the original code. A better fix would involve making too many other changes
to the server that I would prefer not to make in the 1.3 tree.
Jeff Trawick [Fri, 22 Feb 2002 17:31:06 +0000 (17:31 +0000)]
This patch changes a TPF-specific section of http_main.c to use the
correct subpool when initially opening the error log.
This makes TPF's ap_open_logs call the same as other platforms and
prevents a possible SIGPIPE in standalone_main on TPF.
Submitted by: David McCreedy
Reviewed by: Jeff Trawick
Graham Leggett [Thu, 21 Feb 2002 06:03:08 +0000 (06:03 +0000)]
When proxy enabled a slow frontend client to read from an
expensive backend server, it would wait until it had delivered
the response to the slow frontend client completely before
closing the backend connection. The backend connection is now
closed as soon as the last byte is read from it, freeing up
resources that would have been tied up unnecessarily.
The proxy code read chunks from the backend server in a
hardcoded amount of 8k. The existing ProxyReceiveBufferSize
parameter has been overloaded to specify the size of this buffer.
Martin Kraemer [Fri, 15 Feb 2002 11:32:34 +0000 (11:32 +0000)]
[Security] Prevent invalid client hostnames from appearing in
the log file. If a double-reverse lookup was performed (e.g.,
for an "Allow from .my.domain" directive) but failed, then
a spoofed dns-reverse-address could appear in the logs. Now
the numeric address is logged instead. Note that
reverse-address-spoofing did NOT actually allow access
to any protected resource! It was only possible to cause apache to
log arbitrary names (for resources protected thusly) if you had
control over the reverse dns zone.
Graham Leggett [Wed, 13 Feb 2002 05:35:02 +0000 (05:35 +0000)]
Some browsers ignore cookies that have been merged into a
single Set-Cookie header. Set-Cookie and Set-Cookie2 headers
are now unmerged in the http proxy before being sent to the
client.
PR:
Obtained from:
Submitted by:
Reviewed by:
Graham Leggett [Mon, 11 Feb 2002 21:15:19 +0000 (21:15 +0000)]
Corrected the use of ap_table_set and ap_table_merge:
- Fix a problem with proxy where each entry of a duplicated
header such as Set-Cookie would overwrite and obliterate the
previous value of the header, resulting in multiple header
values (like cookies) going missing.
- Fix a problem with proxy where X-Cache headers were
overwriting and then obliterating upstream X-Cache headers
from other proxies.
PR:
Obtained from:
Submitted by:
Reviewed by:
Bill Stoddard [Sat, 9 Feb 2002 14:51:30 +0000 (14:51 +0000)]
Win32: Eliminate blocking network i/o in the Windows code paths. In practice
only sends() were ever blocking. That any network i/o was ever blocking
could be considered a bug in Apache.
This patch seems to work around a bug in WinXP that causes network write
data corruption. The bug appears to be tickled by the combined use of
WSADuplicateSocket and blocking sends(). Allan Edwards is submitting a
bug report to Microsoft.
Only lower case the canonical name on a call to ap_os_canonical_filename()
if ap_os_case_canonical_filename() fails to retieve the information from the
file system, at least we have the casing from the request.
Ken Coar [Tue, 5 Feb 2002 15:21:55 +0000 (15:21 +0000)]
Demote the 'turned /foo into http://host/foo' message from
WARNING to DEBUG; it's a supported operation, so no need to
fill normal log files with noise. Setting LogLevel to Debug
will show the activity, though.
Martin Kraemer [Mon, 4 Feb 2002 13:57:39 +0000 (13:57 +0000)]
Fix the longstanding bug that errors (returned by src/Configure)
would not be noticed by the top level configure script.
That was bad for automated production environments, as errors would
go thru unnoticed, and caused havoc much later in the production.
Martin Kraemer [Sun, 27 Jan 2002 22:08:30 +0000 (22:08 +0000)]
ftp proxy: various cosmetic and functional improvements
- Allow for /%2f hack (to access the root directory / )
- properly escape generated links in dir listing
- do directory listings in ASCII, to avoid problems with EBCDIC servers
- close data & control channels to server properly
- rename "BUFF f" to "BUFF data" or "BUFF ctrl", depending on its FTP use
Martin Kraemer [Sun, 27 Jan 2002 19:57:55 +0000 (19:57 +0000)]
* Rename "BUFF f" to "BUFF data" or "BUFF ctrl", depending on ftp use
(cosmetics only)
* Make output look more like xhtml (cosmetics only)
* Properly escape file names from ftp directory listing (as HTML or URI)
* Treat ftp rc 421 (closing connection) like -1 (connection was closed)
* fix a possible pointer underrun
Per W. Stoddard, Greg Marr and my research, let's get this right.
This change is a decorative NOOP. It accurately reflects what the
MSVC compiler actuall turned into bytecode. We hope this change
makes the actual fns clearer to the developer.
However, there is no effective difference. The _stdcall declaration
for these functions was _ignored_ by MSVC, which treated the fn's
as _cdecl (our API_EXPORT_NONSTD macro) because they use varargs.
This time, buff.c:ap_bvputs() was out of sync (correct to this patch)
ap_rprintf is implemented as API_EXPORT() in http_protocol.c.
Therefore, make the prototype and implementation consistant.
The question remains, why no compiler warning/emit? Because MSVC [my
version, at least] must have changed all of the ap_fn(foo, ...) decl
from _stdcall to _cdecl, on it's own!
I suggest our declarations are still borked, but they have worked only
because MSVC ignored our poor judgement :)
Several final namespace changes. Exports (with an ap_ prefix!) the
useful sendwithtimeout/recvwithtimeout symbols. How useful? SSL needs
them, and proxy_connect should probably use them as well. And corrects
two newly exported (never released) symbols since they did not require
the _NONSTD semantics.
Dispatch 26 compiler emits into oblivion. Vetting is desired, please
post to the list if you participate. They are all blindingly obvious,
but extra eyes always help
This eliminates all but the regex emits and MSVC's borked misdeclaration
of FD_SET.
Bill Stoddard [Thu, 17 Jan 2002 21:21:09 +0000 (21:21 +0000)]
On HPUX 11.x, the 'ENOBUFS, No buffer space available'
error occures because the accept() cannot complete.
You will not see ENOBUFS at 10.20 because the kernel
hides any occurrence from being returned from user space.
ENOBUFS at 11.0 TCP/IP is quite possible, and could
occur intermittently. As a work-around, we are going to
ingnore ENOBUFS.
Submitted by: madhusudan_mathihalli@hp.com
Reviewed by: Bill Stoddard
Jim Jagielski [Thu, 17 Jan 2002 13:20:51 +0000 (13:20 +0000)]
PR:
Obtained from:
Submitted by: Stipe Tolj <tolj@wapme-systems.de>
Reviewed by:
Add in Stipe's Cygwin changes.... Have not folded in the Cygwin
timeout kill signaling patch yet... waiting for feedback.
Here are the changes:
* src/include/ap_config.h: adding HAVE_PTHREAD_SERIALIZED_ACCEPT to
Cygwin block and defaulting to it.
* src/main/http_main.c: exluding pthread_mutexattr_setpshared() call
for Cygwin platform. This calls seems yet not fully functional on this
platform. Forwarding problem to Cygwin core developers.
* src/Configure: changed OS_MODULE_INCLUDE var for the Cygwin
platform block to refer to the (absolute) relative path for the
Makefile.Cygwin file.
* src/modules/proxy/Makefile.tmpl: target libproxy.dll is hardcoded
for OS/2. That's not good. We have the same target on Cygwin, but use
other calls for it, so if construct here.
* src/modules/standard/Makefile.Cygwin: adding a dummy target %.def
: %.c to satisfy OS/2 related dependacies on Cygwin too. Changed the
"run make twice" screen slightly.
Jeff Trawick [Wed, 16 Jan 2002 15:52:15 +0000 (15:52 +0000)]
fix a syntax error in an initializer which prevented http_main.c from
compiling on at least OS/390, AIX w/ xlc, and HP-UX with HP compiler;
Tru64 cc previously complained but generated code anyway; gcc -Wall
didn't complain before
unfortunately, this introduces a warning with gcc -Wall on Solaris since
in_addr is a union
Bill Stoddard [Tue, 15 Jan 2002 17:27:32 +0000 (17:27 +0000)]
This patch fixes my previous change for argument passing, put in place
to support rotatelogs. It only affects TPF. I was stupidly displacing past
the end of the "args" array while setting up to fork to rotatelogs (or a CGI).
Tony Finch [Mon, 14 Jan 2002 04:49:44 +0000 (04:49 +0000)]
Following taunts from Alfred Perlstein on IRC, use "httpready"
accept filter rather than "dataready" on FreeBSD after 4.1.1-RELEASE
where it works correctly.
Ken Coar [Wed, 9 Jan 2002 19:47:03 +0000 (19:47 +0000)]
Whoops, forgot to bump MMN. Major bump because of a change
to the semi-private core_dir_config structure. (Also fix a
stale comment from an earlier version of the FileETag patch.)
It's clear from recent security reports that including configuration
examples for non-core add-ins with our default .conf files causes some
admins to bypass actually researching -how-to-configure- the given
add-in module. While this example was nice, we need to find another
useful example, in addition to x-tar perhaps, to make this clearer.
Martin Kraemer [Tue, 8 Jan 2002 15:09:48 +0000 (15:09 +0000)]
The 416 "range not satisfiable" response would include a
Content-Length header set to the size of the resource, but no body was
actually returned (r->header_only was set to 1). This appeared as a
premature EOF to the client.
Submitted by: Joe Orton <joe@manyfish.co.uk>
Reviewed by: Martin Kraemer
Ken Coar [Sat, 5 Jan 2002 17:13:03 +0000 (17:13 +0000)]
Replace automatic ETag generation with configurable algorithm
defined by FileETag directive. Keywords are All, None,
[+|-]INode, [+|-]Size, [+|-]MTime. Server farms with content
fanout may want to use 'FileETag MTime Size' to keep the system-
variant inode from being included and busting caches.
PR: 7010
Submitted by: Based on an idea proposed by Phil Dietz
Fixed the problem on NetWare when accessing an empty directory which
has option indexes specified produces an access forbidden message.
Submitted by: Charles Goldman, Guenter Knauf
Fixed the problem on NetWare when accessing an empty directory which
has option indexes specified produces an access forbidden message.
Submitted by: Charles Goldman, Guenter Knauf
Normalize symbol exports for Win32/Netware to the httpd.exp reference.
Diff tags pre_win_nw_syms/post_win_nw_syms for complete edit.
Note I've corrected _SEVERAL_ badly declared symbols on Win32 into
API_EXPORT_NONSTD flavors (e.g. those using (...) args). This may,
or may not, break binary compatibility depending on how those args
are addressed, and if those functions were used.
I've further tested by setting aside the .def file and rebuilding,
and validated that our symbols list corresponds to the API_DECLARE()
macros at this moment.
Submitted by: Thomas Eibner <thomas@stderr.net>
Reviewed by: Stoddard, Rowe
Already patched in the 2.0 tree - make all .conf's reflect the applicable
DNS rfc's that underbars aren't permitted - why should our examples show
administrators otherwise?!?
One of two gdawful bugs in Apache/Win32, start capturing child errors.
The other [significant] error is the tendancy for the parent to restart
instantly on init errors, which are never corrected. But that's a patch
for another day.
I know Stoddard fixed this other bullet - would someone with a long
memory (Jim? Marc?) be willing to get rid of a few more now-dead items?
I'm not certain on the others, but there are several bullets that look
like they've been addressed, or are no longer relevant.
Fix a very irritating nit - this was the 1.3.20 code - there was no
call for changing the formatting when the patch to add another platform
in the #if case was modified.
Revert the code causing lost path_info/query_args.
The potentially correct solution is to test the URI with recombined
path_info and args, but I'd rather see this reverted for 1.3 and
corrected in 2.0 with appropriate optimizations and user testing.