Graham Leggett [Sat, 9 Mar 2002 06:59:28 +0000 (06:59 +0000)]
Scrap CacheMaxExpireMin and CacheDefaultExpireMin. Change
CacheMaxExpire and CacheDefaultExpire to use seconds rather than
hours.
PR:
Obtained from:
Submitted by:
Reviewed by: Bill Stoddard
Bill Stoddard [Fri, 8 Mar 2002 21:59:25 +0000 (21:59 +0000)]
No this is not a pretty site... close the cached file descriptor. There is no clean
way to get this back into an apr_file_t since we are in the request pool cleanup.
Greg Ames [Fri, 8 Mar 2002 20:24:07 +0000 (20:24 +0000)]
ap_rgetline_core: fix a bug with folding observed while testing ebcdic.
Garbage characters sometimes appeared after a legitimate folded header.
We weren't allocating an extra byte for the trailing null, or copying it,
when called from get_mime_headers (folding is in use, and ap_rgetline is
responsible for allocating memory). No need to worry about a trailing
LF - it's already been nuked.
I checked the partial line code to see if it had a similar bug. It looked
like it did, and that the code which trims the back end of the line would
run multiple times and whack innocent bytes. However, gdb showed that this
section of code appears to be dead due to input filter chain changes.
Aaron Bannert [Fri, 8 Mar 2002 18:00:40 +0000 (18:00 +0000)]
Fix a bug that would cause SERVER_CONFIG_FILE to be an absolute path,
which would prevent the relocation of an httpd binary without having to
specify the -f flag.
Now it will be relative to the $prefix if $sysconfdir shares a common prefix,
or it will remain relative to $sysconfdir.
Submitted by: Thom May <thom@planetarytramp.net>, Aaron Bannert
Jeff Trawick [Fri, 8 Mar 2002 13:46:36 +0000 (13:46 +0000)]
add a bit of error checking to the mod_cgid daemon's logic to read
the request over the unix socket
it isn't perfect (EINTR, partial reads) but it is good enough to
avoid segfaulting if some code tries to verify that cgid is active
by connecting to its unix socket
Ian Holsman [Fri, 8 Mar 2002 04:14:26 +0000 (04:14 +0000)]
new directive SSIUndefinedEcho.
this allows webadmins to change the default '(none)' to something
a bit more presentable (eg <!-- undef -->)
PR:
Obtained from: Rex (the hack he had to fix this was so ugly I was forced to do this)
Submitted by:
Reviewed by:
Jeff Trawick [Fri, 8 Mar 2002 02:03:47 +0000 (02:03 +0000)]
implement a common function for getting a socket and trying to connect
to the target host; use that common function for proxy HTTP and proxy
CONNECT
In that new function, fix this problem:
Proxy HTTP and CONNECT: Keep trying other addresses from the DNS
when we can't get a socket in the specified address family. We may
have gotten back an IPv6 address first and yet our system is not
configured to allow IPv6 sockets.
An example host is www.ipv6.org. The first address I get back is
an IPv6 address, but my machine may not be configured to allow an
AF_INET6 socket.
Before the fix: The apr_socket() failure was fatal.
After the fix: When apr_socket() fails, we go to the next address from
the resolver, successfully create a socket in the
specified family (AF_INET), and all is well.
(an unrelated fix in this commit was to pass a server_rec in a broken
ap_log_error() call)
Need to check if the userdir is absolute before it gets split apart by ap_getword()
Also fixed up the !HAVE_DRIVE_LETTERS case (such as NetWare) where
the volume delimiter ( colon ) is not in an absolute position.
Greg Ames [Thu, 7 Mar 2002 22:08:46 +0000 (22:08 +0000)]
ap_rgetline: fix folding and partial line handling on ebcdic boxes. The
normal case worked OK, but due to the recursion and multiple exit points,
input bytes could go thru charset translation multiple times or not at all.
Bill Stoddard [Thu, 7 Mar 2002 21:44:49 +0000 (21:44 +0000)]
Do a better job of cleaning up (plug memory leaks) and handling aborted
cache updates. We really need a better way to allocate cache_objects.
Making WAY too many malloc/calloc calls...
Aaron Bannert [Thu, 7 Mar 2002 15:09:36 +0000 (15:09 +0000)]
It is bad to recursively remove every CVS directory in a person's
home directory. Bad bad bad. Make sure the variable was set to
something before cd-ing to blank and ending up in their $HOME.
Aaron Bannert [Thu, 7 Mar 2002 15:06:07 +0000 (15:06 +0000)]
It is bad to recursively remove every CVS directory in a person's
home directory. Bad bad bad. Make sure the variable was set to something
before cd-ing to blank and ending up in their $HOME.
Also, since each line under a make rule is treated as a new subshell,
it's not necessary to surround the whole line in ()s.
As hinted on dev@httpd, change filter naming schemes to match our
expectations of their usage.
The reason that we should make this change now is that we have changed
the implied meaning of AP_FTYPE_HTTP_HEADER - some users of this should
be PROTOCOL while others should be CONTENT_SET. In order to clarify it,
toss all of the bogus names and force the filter writers to make sure
they understand what they are doing.
CONTENT_SET is new (horrible name - change if you have better idea), but
it indicates that it should run between RESOURCE and PROTOCOL.
mod_deflate is the ideal CONTENT_SET filter.
The changed type names are:
CONTENT is now RESOURCE.
HTTP_HEADER is now PROTOCOL. However, most filters that used HTTP_HEADER
may want CONTENT_SET. (Only things like POP and HTTP belong as PROTOCOL.)
MMN bump since all filters need to be recompiled due to filter reordering.
Ryan Bloom [Thu, 7 Mar 2002 06:07:25 +0000 (06:07 +0000)]
We need to setup protocol filters for the fake request. If we don't,
then when any request filters are added, the connection filters will be
lost. This fixes the proxy.
Ryan Bloom [Thu, 7 Mar 2002 05:02:53 +0000 (05:02 +0000)]
There is no reason to insert the protocol filters in the insert_filters
phase. This moves us to inserting the filters in the create_request
phase. This makes more sense, because now the protocol filters are attached
to the request as soon as possible. Previously, some requests never
called the insert_filters phase, so they don't get the filters. Think
redirects for reqeusts that never call insert_filters.
Ryan Bloom [Thu, 7 Mar 2002 02:09:30 +0000 (02:09 +0000)]
Remove the prev pointer from the filter chain. This removes
the complexity of trying to set the filter chain correctly, with the
side-effect of forcing us to walk the entire chain whenever we add
a filter. Since the filter chains are small, the decrease in
complexity is worth it.
Reviewed by: Allan Edwards
Jeff Trawick [Thu, 7 Mar 2002 00:23:30 +0000 (00:23 +0000)]
64-bit build on AIX:
fix major bogosity in the logic to avoid setting LDR_CNTRL=MAXDATA=xxx
for a 64-bit build... the name of the environment variable was wrong
and even the test usage was bogus
Joshua Slive [Wed, 6 Mar 2002 15:57:52 +0000 (15:57 +0000)]
A few changes of my own:
Get rid of the 100% table widths, since they don't render well in MSIE.
Add the back in "Module Identifier".
Fix the remaining extra-space problems.
Cliff Woolley [Tue, 5 Mar 2002 18:21:39 +0000 (18:21 +0000)]
Detabify those parts of this file which don't collide with the bucket
freelist patch. The remaining tabs go away for free with that patch.
Submitted by: Sander Striker
Reviewed by: Brian Pane
Ryan Bloom [Tue, 5 Mar 2002 05:41:28 +0000 (05:41 +0000)]
Remove another hack from the server. The add_required_filters function
was required to make sure that the sub request had the correct filters
when we went send the error page. With the new filter insertion logic,
this is no longer necessary.
Bill Stoddard [Mon, 4 Mar 2002 17:13:08 +0000 (17:13 +0000)]
Bail on computing the amount of bytes in a brigade if any of the buckets
have indeterminate length (e.g., a pipe bucket). Passing an invalid length
into mod_mem_cache can cause it to overflow its cache buffer.
Ensure that net_time filter isn't added on subreqs - we assume that it is
added on !r->main requests. This led to infinite loop/SEGV when dealing
with anything that created a subreq.
(I don't think core_create_req is a good place for adding this filter.)
Ryan Bloom [Mon, 4 Mar 2002 05:54:44 +0000 (05:54 +0000)]
Adding the same filters over and over again used to be okay, because
we would lose the extra filters. Now, if a filter is added, it is run.
Unfortunately, this can cause an infinite loop, or it can cause request
headers to appear twice. This commit removes two instances in the core
where we were inserting filters for a second and third time. The bug
was that error responses were causing infinite loops.
This also removes the reset_filters function, which did the exact
same thing as add_required_filters. The two functions were both called
in error conditions, which was part of what caused this bug.
Ryan Bloom [Mon, 4 Mar 2002 05:29:04 +0000 (05:29 +0000)]
If we insert a protocol filter before we insert a request filter, we
must set the r->output_filter to r->proto_output_filter. If we don't,
then as soon as we insert the request filter, the protocol filter will
be removed. This was causing headers to not be sent on some requests.