Ryan Bloom [Sat, 18 Nov 2000 04:53:23 +0000 (04:53 +0000)]
Fix 204 handling. This moves some logic that used to be in
ap_send_error_response to the http_header filter. The reason for the move,
is that the header filter takes care of all header processing now. Without
this change, we were sending garbage data to the client whenever we sent
304 responses.
Submitted by: Brian Havard and Ryan Bloom
Ryan Bloom [Sat, 18 Nov 2000 03:17:21 +0000 (03:17 +0000)]
More proxy fixes. There are still some bugs in this code, but this has
successfully proxied www.yahoo.com and www.ntrnet.net among other test
sites that I chose at random.
Ryan Bloom [Fri, 17 Nov 2000 18:33:33 +0000 (18:33 +0000)]
First pass at a set of caching filters and handlers. This implements a
working disk cache. There are a lot of improvements to be made to this,
but this is a pretty good start to a dynamic cache.
Jeff Trawick [Fri, 17 Nov 2000 03:45:02 +0000 (03:45 +0000)]
APR: Change apr_connect() to take apr_sockaddr_t instead of hostname.
Add generic apr_create_socket(). Add apr_getaddrinfo() for doing
hostname resolution/address string parsing and building
apr_sockaddr_t.
Submitted by: David Reid
Reviewed by: Jeff Trawick
Ryan Bloom [Fri, 17 Nov 2000 00:19:30 +0000 (00:19 +0000)]
This removes all BUFF's from the HTTP proxy. This code is relatively
ugly, but it does proxy pages. This even fixes the content-type bug
that I introduced yesterday sometime. As soon as BUFF is removed from
the FTP proxy, the buff.c and buff.h files need to go away.
Ryan Bloom [Thu, 16 Nov 2000 01:57:46 +0000 (01:57 +0000)]
Make the proxy work with filters. We are still using BUFF for the
back-end communication, but BUFF has been removed from the communication
with the client. The headers are not working correctly yet, but we are
making progress. The most important part of this commit is that we are
able to actually filter data coming from the proxy.
Ryan Bloom [Wed, 15 Nov 2000 22:08:44 +0000 (22:08 +0000)]
Do not send a content-length if and only if this is a HEAD request and
the content-length is 0. The problem is that the C-L on a HEAD response
has to be the correct C-L, but if a handler returns saying the handled
the request without sending data, the core sends an EOS down the filter
stack, and we compute a 0 C-L.
Greg Stein [Wed, 15 Nov 2000 02:05:12 +0000 (02:05 +0000)]
Apply a patch from John Vasta for adding (some/more) DeltaV support to
mod_dav. The patch applied and compiled cleanly, so I'm committing. Any
necessary changes from a review will come later, so that we can easily track
what needed to change (and can be back-ported to mod_dav 1.1).
Joshua Slive [Wed, 15 Nov 2000 01:28:40 +0000 (01:28 +0000)]
Hmmm... It appears that there were some translation in the 2.0 "it works"
page that were not in the 1.3 version. Bring these up to date with the
new name for the http server web site.
Ryan Bloom [Tue, 14 Nov 2000 22:28:56 +0000 (22:28 +0000)]
Get the proxy to look at requests that are being proxied again. In the
big commit of the other day, a few !r->proxyreq's were changed to
r->proxyreq, which made the proxy decline requests when it shouldn't
have.
Submitted by: Cliff Woolley <cliffwoolley@yahoo.com>
Reviewed by: Ryan Bloom
Jeff Trawick [Tue, 14 Nov 2000 12:00:44 +0000 (12:00 +0000)]
Get "make install" to work on Tru64.
With Tru64, make picks up a bad status from the child shell process
when it evaluates the "`echo ($static) | grep 'mod_so'` (see below),
causing make to bail out.
But that grep should always fail when "make install" runs in
modules/extra and unless we have mod_so it will fail when "make
install" runs in modules/standard.
The work-around is to explicitly ignore the exit status from the
grep.
Ryan Bloom [Tue, 14 Nov 2000 06:11:24 +0000 (06:11 +0000)]
Stop the default_handler from trying to deal with HEAD requests. By doing
this, the content-length filter can determine the C-L before we send the
response, and we get a better response.
Ryan Bloom [Tue, 14 Nov 2000 06:07:40 +0000 (06:07 +0000)]
Make the header filter decide if a body should be sent. This gives us a
chance to compute the proper content-length before we try to send a set
of headers. If a handler wants to ignore the HEAD method, then it can
either just return from the handler function or pass an EOS bucket down
the filter stack. Either method will still get the headers sent to the
client.
This change allows handlers to actually run the request like it is a GET
request. The core itself will then ensure that no body is sent. This
allows us to get more information about the request before sending out the
headers for the HEAD request.
Ryan Bloom [Tue, 14 Nov 2000 04:52:33 +0000 (04:52 +0000)]
If the content-length is zero, then we don't output the Content-Length
header file. The only time that the C-L should be zero is if there is
no body. Zero is a valid content-length, but the only time that we ever
really send it is on a HEAD request right now, and that is incorrect.
The HEAD response should have the actual content's length.
Ryan Bloom [Tue, 14 Nov 2000 04:22:03 +0000 (04:22 +0000)]
Associate a pool with the pool bucket so that it serves it's intended
purpose. This also moves the create_pool function outside of an if to
decrease complexity.
Ryan Bloom [Tue, 14 Nov 2000 01:55:26 +0000 (01:55 +0000)]
Port mod_info to 2.0. This is basically a complete re-write to use the
config tree instead of re-reading the config file. As a part of this
change, the config tree needs to be exposed to modules as ap_conftree.
Submitted by: Ryan Morgan <rmorgan@covalent.net>
Reviewed by: Ryan Bloom
Ryan Bloom [Tue, 14 Nov 2000 01:46:39 +0000 (01:46 +0000)]
We can not use heap buckets for data that was allocated out of a pool.
The basic problem is that when the pool is destroyed, the data will go
away unless it is in a pool bucket. If it is in a pool bucket, then the
data will be copied into a heap bucket when the pool is destroyed. This
becomes a real issue when we set some data off to the side to deal with
pipelined requests.
Bill Stoddard [Mon, 13 Nov 2000 22:52:19 +0000 (22:52 +0000)]
Update coalesce filter to use heap buckets rather than pool buckets. This should fix the
mod_autoindex funky chunking behaviour until the ap_r* routines are reimplemented, at which
time this filter should probably go away.
Ryan Bloom [Mon, 13 Nov 2000 14:19:41 +0000 (14:19 +0000)]
The core handler should never close a file, because we haven't actually
sent the file yet. This also removes the send_http_headers call, because
that's a no-op so it doesn't make much sense to leave it in.
Jeff Trawick [Mon, 13 Nov 2000 03:50:16 +0000 (03:50 +0000)]
Clean up some of the warnings from a Tru64 build, mostly due to
the recent apr_ssize_t->apr_size_t changes. The problem in mod_cgid
was an int function which didn't have a return statement.
Ryan Bloom [Mon, 13 Nov 2000 03:42:02 +0000 (03:42 +0000)]
Get SINGLE_LISTEN_UNSERIALIZED_ACCEPT working again. This defines that
macro on those platforms that have it defined in 1.3. The only platform
that doesn't work yet is Linux 2.2.
Jeff Trawick [Mon, 13 Nov 2000 03:18:18 +0000 (03:18 +0000)]
add apr_get_home_directory(), teach mod_userdir to use that
instead of calling getpwnam[_r] directly, back out mod_userdir's
config check for getpwnam_r
Ryan Bloom [Sat, 11 Nov 2000 06:06:00 +0000 (06:06 +0000)]
Not all platforms have INADDR_NONE defined by default. Apache used to
check for this and the define it if needed. Since APR also needs this
check it makes more sense for APR to just check and export a symobl that
is always available.
Submitted by: Branko �ibej <brane@xbc.nu>
Reviewed by: Ryan Bloom
Jeff Trawick [Fri, 10 Nov 2000 23:52:18 +0000 (23:52 +0000)]
Get mod_userdir compiling on FreeBSD when APR_HAS_THREADS.
This doesn't account for the fact that getpwnam() isn't
thread-safe on FreeBSD; it also doesn't account for systems
where getpwnam_r lives outside of libc.
See thread with subject "[?PATCH?] using getpwnam_r in mod_userdir"
in Nov. 2000 new-httpd for some better long-term ideas for how to
handle the problem.
Ryan Bloom [Fri, 10 Nov 2000 21:51:10 +0000 (21:51 +0000)]
MM has a bug that when you ask for a specific amount of shared memory
it allocates just that amount. But, MM actually uses some of it, so we
need to over allocate just a bit. On 32 bit machines 40 bytes is enough,
but on a 64 bit machine it isn't. So, we bump it up to 80 bytes until
MM fixes this bug.
Submitted by: David Hill <David.D.Hill@compaq.com>
Just some things I noticed letting someone else have some desktop time.
Guess homework isn't a bad sacrifice, actually read some docs :-)
Correct me if I'm wrong on the mod_auth_digest changes.
Tony Finch [Fri, 10 Nov 2000 01:34:46 +0000 (01:34 +0000)]
In mass hosting setups (using mod_vhost_alias or mod_rewrite) where
the hostname is interpolated into the filename, we need to be sure
that the result of interpolation doesn't expose parts of the
filesystem that should be private. This was done by checking the
syntax of the Host: header according to RFC 1123 and RFC 952. However,
many people have broken configurations that violate this syntax
(frequently because they use underscores in their names), and it also
doesn't accommodate the current effort to internationalize the DNS. I
don't think the former is a compelling reason to relax the syntax
checking, but the latter does justify this change.
The only RFC on internationalized DNS at the moment is RFC 2825 which
is an introduction to how difficult the whole thing is; the other
official documentation is a pile of Internet Drafts produced by the
Internationalized Domain Names Working Group of the IETF (with names
starting "draft-ietf-idn-"). However they have very little to say
about URIs, and the current Internet draft about internationalized
URIs (draft-masinter-url-i18n-05) has very little to say about
hostnames :-( On the gripping hand there is some useful information at
<http://www.apng.org/idns/> where there is some iDNS testbed work
going on. The basic idea is that although the format of the hostnames
in the DNS itself remains compatible with RFC 1123, the actual
hostname presented to the resolver is in UTF8, and therefore the
hostname in the URL and Host: header is also in UTF8.
This change relaxes the checking so that only character sequences that
are sensitive to the filesystem are rejected, i.e. forward slashes,
backward slashes, and sequences of more than one dot.
David Reid [Fri, 10 Nov 2000 00:58:25 +0000 (00:58 +0000)]
Bring the apr_in_addr type into line with naming conventions and make changes
where appropriate. At least on my system virtual hosts seem to still work :)
Ryan Bloom [Thu, 9 Nov 2000 22:05:40 +0000 (22:05 +0000)]
Remove MMAP handling from the default handler. MMAPs are created by the
file_bucket read function now. If we try to read from a file bucket and
it makes sense to convert that bucket to an MMAP, that just happens.
Per new-httpd discussions, this version of mod_autoindex has been set
aside as a test for rputs style backwards compatibility. It has really
horrid chunking charateristics, so it was the ideal nominee for the job.
Please refer to src/modules/standard/mod_autoindex.c for the complete
revision history. When rputs is entirely eliminated (if it ever is)
then this version should be eliminated.