André Malo [Wed, 2 Apr 2003 21:01:09 +0000 (21:01 +0000)]
Fix the prefix_stat function. (which does a stat call on the first
path segment). This function was still tailored for unix systems only.
It should work on other systems as well now.
Note that in 2.x we use the apr_filepath_root function that doesn't
exist in 1.3. It is replaced by some simple workaround stuff which
behaves similar.
Obtained from: 2.1 (r1.143)
Reviewed by: Brad Nicholes, Will Rowe
André Malo [Wed, 2 Apr 2003 20:54:09 +0000 (20:54 +0000)]
Remove _unused_ code. The condition is never true, because
"A local rewrite in per-directory context" was caught much earlier.
I'd guess this piece of code was c&p accidentally...
Obtained from: 2.1 (r1.142)
Reviewed by: Brad Nicholes, Will Rowe
André Malo [Wed, 19 Mar 2003 14:01:08 +0000 (14:01 +0000)]
backport from 2.x:
Prevent endless loops of internal redirects in mod_rewrite by
aborting after exceeding a limit of internal redirects. The
limit defaults to 10 and can be changed using the RewriteOptions
directive with the new MaxRedirects=n argument.
(The latter required some restructuring of the RewriteOptions
evaluation code).
Martin Kraemer [Wed, 5 Mar 2003 15:50:29 +0000 (15:50 +0000)]
Fix longstanding BS2000(OSD_POSIX) related bug -- a CGI program which
terminated quickly would cause an endless loop.
;-) Nobody noticed by now, so I guess few people used it.
Bradley Nicholes [Wed, 26 Feb 2003 17:38:44 +0000 (17:38 +0000)]
Since NetWare doesn't have processes the entire issue of having to close
handles before an exec is non-existent. So just bypass the close on exec
magic cleanup stuff.
Jeff Trawick [Wed, 19 Feb 2003 20:39:59 +0000 (20:39 +0000)]
Unix build: Add support for environment variable
EXTRA_LDFLAGS_SHLIB, which allows the user to add to the hard-coded
ld flags specified for DSOs. Compare with the existing LDFLAGS_SHLIB
environment variable, which allows the user to completely replace the
hard-coded ld flags specified for DSOs.
André Malo [Sun, 16 Feb 2003 04:42:24 +0000 (04:42 +0000)]
drop the guess_domain function.
Our docs say about AuthDigestDomain:
This directive should always be specified and contain at least the (set of)
root URI(s) for this space. Omitting to do so will cause the client to send
the Authorization header for every request sent to this server.
guessing the parameter is somewhat bogus. guess_domain() also resulted sometimes
in relative URIs, non-URI strings or empty strings, which caused a lot of
problems.
According to the docs, the domain parameter will be omitted now,
if not specified. This is exactly, what one would expect.
Teach win32 about magic_cleanups to toggle the INHERIT bit for handles.
This can only work for NT, since 9x cannot alter a handle's INHERIT bit
without a DuplicateHandle() and then closing the original handle, which
just doesn't fit into this API very well.
{Actually, could be done with a bit of convolutions for FILE and fd,
but this won't work by the ap_note_cleanups_for_h() api.)
Jim Jagielski [Wed, 18 Dec 2002 22:43:08 +0000 (22:43 +0000)]
Clean up the compact/verbose cookie code to prevent a lot of
overlap. Who knows, maybe a 3rd format might pop up one
day. If this breaks, note who to blame for it
PR:
Obtained from:
Submitted by:
Reviewed by:
Apply a fix already in Apache 2.0 (and add quality weights) to prevent
us from attempting to serve .gif or any other flavor of negotiated
resources.
This patch fixes the Accept: header of the autoindex request so that
it's subrequests look for text/ only, with weights applied to recover
.html, then .txt, then some other flavor of text/* in their absense.
Resolve 80% of the HEADER/README not recognized on Win32 bug (PR 7300).
Since Apache 1.3 does NOT normalize file names, but instead always lower
cases the names, HEADER.txt or HEADER.html would never, ever be noted
as a match. This is different from Apache 2.0, which can deal with the
proper names and match only HEADER.* or header.* files based on the
origin filename.
Jim Jagielski [Mon, 16 Dec 2002 13:17:38 +0000 (13:17 +0000)]
Add in the new CookiePrefix and CookieFormat directives that allow
for the tracking cookie to have an arbitrary string prepended or
to choose a normal or "compact" cookie.
PR:
Obtained from: Fast Search & Transfer (contributed)
Submitted by: P�l L�berg <pallo@initio.no>
Reviewed by: Rasmus, Jim
Jim Jagielski [Thu, 12 Dec 2002 16:09:52 +0000 (16:09 +0000)]
Where the OS allows, we now proactively use the various _ex and
magic cleanups to close fds (lock files, log files and sockets)
to prevent them from leaking into 3rd party modules that don't
call ap_cleanup_for_exec() before forking off subprocesses.
Bill Stoddard [Tue, 10 Dec 2002 20:18:25 +0000 (20:18 +0000)]
Fix condition that arises when the server is configured as a proxy gateway (aka reverse
proxy) and multiple processes are serving the same backend file at the same time.
Only one of the processes will actually succeed at saving the file, the others will
fail with the message "[error] (17)File exists: proxy: error linking cache file ...".
Changing the message level from APLOG_ERR to APLOG_INFO will keep this message
out of the logs w/o major overhaul of this code.
Jim Jagielski [Mon, 9 Dec 2002 20:21:00 +0000 (20:21 +0000)]
Get rid of somewhat long-standing issue regarding large values
of precision causing a buffer to be clobbered in the vformatter
function (eg: ap_snprintf)
PR:
Obtained from:
Submitted by:
Reviewed by:
Implemented ap_os_default_port() to allow NetWare to resolve the correct
default port based on the request method. This fixes a problem with URL
reconstruction on a redirect.
Jim Jagielski [Sun, 8 Dec 2002 19:09:55 +0000 (19:09 +0000)]
*) Added new ap_register_cleanup_ex() API function which allows
for a "magic" cleanup function to be run at register time
rather than at cleanup time. Also added the
ap_note_cleanups_for_(socket|fd|file)_ex() API functions
which allows for control over whether that magic cleanup
should be called or not. This does not change the default
behavior of the non-"ex" function (eg: ap_register_cleanup).
At present, the magic cleanup is simply code that performs
a CLOSEXEC, but that can be modified (hmmm... maybe an
API issue?)
PR:
Obtained from:
Submitted by:
Reviewed by: Martin
We shouldn't be assigning the output of strtol to an unsigned short. So,
we'll change port to be a long and then do the correct range checking and
downcasting.
Bill Stoddard [Tue, 12 Nov 2002 22:44:06 +0000 (22:44 +0000)]
Update timeout algorithm in free_proc_chain. Try polling the existing subprocess
a few times before going into a 3 second sleep. Often we find that the subprocess
will exit within milliseconds.
Ken Coar [Tue, 12 Nov 2002 19:59:16 +0000 (19:59 +0000)]
Add a SERVER_ADDR keyword to match the CGI environment variable,
to allow conditional setting according to the IP address on
which the server received the request.
Martin Kraemer [Fri, 25 Oct 2002 21:12:23 +0000 (21:12 +0000)]
csd and dupped_csd are sockets, so they ought to handled in ap_note_cleanups_for_socket().
(Not noticed before because ap_note_cleanups_for_socket() and ap_note_cleanups_for_fd() simply close the fd,
except for OSs where closesocket() in different from close())
Martin Kraemer [Mon, 21 Oct 2002 13:41:57 +0000 (13:41 +0000)]
When we detect a child exiting with APEXIT_CHILDFATAL in process_child_status(),
we simply exit(). Remove the pid file too, because it makes no sense after
the parent has terminated.
I assume that a better strategy here would be to kill(getpid(), SIGTERM) to
enforce a regular shutdown sequence, killing the other child processes too.
At the moment, they might be left running and blocking the server socket.
Martin Kraemer [Thu, 10 Oct 2002 16:36:21 +0000 (16:36 +0000)]
Some versions of tr (noticed on a special Solaris8 version) fail to accept
the "tr '[a-z]' '[A-Z]'" syntax. Fall back to some heuristics to create
a workable ap_config_auto.h anyway.
Jim Jagielski [Thu, 3 Oct 2002 20:51:53 +0000 (20:51 +0000)]
Sometimes I'm a dope. No need to allocate a bunch a space... we just
want to see if there's any whitespace past the number.
PR:
Obtained from:
Submitted by:
Reviewed by:
Jeff Trawick [Thu, 3 Oct 2002 19:58:09 +0000 (19:58 +0000)]
PORT: Enable SINGLE_LISTEN_UNSERIALIZED_ACCEPT for AIX 4.3.2
and above. Rewrite configure logic for modern levels of
AIX to support future releases of AIX with no changes to
Apache.
This is basically a housekeeping matter to avoid having separate
stanzas for each AIX release and to add some finer detail to
the -DAIX=xxx value so that we know when to enable
SINGLE_LISTEN_UNSERIALIZED_ACCEPT.
I suspect that this fixes the recognition of AIX on ia64, but
nobody complained when it was broken and I don't know where to
find such a beast.
Scratch another its - this patchs allows me to hugely simply auth modules
which use non 4xx methods for auth (such as cookies, referers ,etc).
Submitted by Sander van Zoest (for a slightly different reason) - see
explanation below.
From: Sander van Zoest
To: dev@httpd.apache.org
It is common practice to set Cookie's to pass along on HTTP
redirects for "login" authentication.
When implementing P3P <http://www.w3.org/P3P/> using
mod_headers.c the Header directive only sets r->headers_out
and does not pass the headers along for non-2XX responses
such as error pages and redirects.
To provide this functionality we added the ErrorHeader
directive which populates r->err_headers_out instead.
Below follows a patch for 1.3.X by Michael Radwin <radwin_at_yahoo-inc.com>.
I have some code that attempts to add Directive to 2.0.X, but
it seems that output_filters are shortcuted on 3XX responses.
While now by setting the Header directive it also passes the headers
along at for all non-2XX responses except 3XX responses.
Cheers,
--
Sander van Zoest
PR: 9181
Obtained from: Michael Radwin
Submitted by: Sander van Zoest
Reviewed by: Dirk-Willem van Gulik
Scratched a major itch - got bitten by config directory globbing sucking
in an editor backup file once too many. Applied the patch as submitted
by Sander van Zoest (Bug id 12712) whichs makes it possible to limit
the scope with simple but effective wild cards.
PR: 12712
Obtained from: Sander van Zoest
Submitted by: Sander van Zoest
Reviewed by: Dirk-Willem van Gulik
Scratched a major itch - got bitten by config directory globbing sucking
in an editor backup file once too many. Applied the patch as submitted
by Sander van Zoest (Bug id 12712) whichs makes it possible to limit
the scope with simple but effective wild cards.
Jim Jagielski [Sat, 21 Sep 2002 17:18:34 +0000 (17:18 +0000)]
Add the ShmemUIDisUser directive and logic. Apache does not require
that the SysV shared memory segment be reset to the uid/gid of
User/Group. In fact, it's not wise that it do so. However, there are
some 3rd party "add ons" that require/expect this behavior...
So allow admins to do so, assuming they know the impacts.
PR:
Obtained from:
Submitted by:
Reviewed by: