Ryan Bloom [Tue, 7 Nov 2000 00:58:49 +0000 (00:58 +0000)]
Always compute the content-length regardless of whether it is sent to the
client or not. The reason for this, is that it allows us to log the
bytes sent to the client correctly. This also simplifies the
content-length filter a bit, by making it a single pass through the
brigade.
Ryan Bloom [Tue, 7 Nov 2000 00:33:48 +0000 (00:33 +0000)]
Remvoe AP_END_OF_BRIGADE. This definition didn't really mean anything,
because it didn't signify the end of the brigade, and it didn't signify
the end of a response. It ended up meaning flush the data, which can be
detemined with bucket type checks. This also makes the FLUSH and EOS
buckets have a 0 length, which makes a lot of code cleaner, because now we
can just add lengths and be sure they are all >=0.
Ryan Bloom [Mon, 6 Nov 2000 20:43:19 +0000 (20:43 +0000)]
ap_send_fd should not be sending an EOS bucket, so we should remove any
trace of that possibility from the code. First of all, there is nothing
that says you can only send one file bucket in a response, and second,
even if a handler sends a file, nothing says that it can't add text before
or after it too.
Ryan Bloom [Sun, 5 Nov 2000 04:06:17 +0000 (04:06 +0000)]
Allow the core_output_filter to save data in the filter past the end of
the first request if this is a keepalive connection. This allows us to
save the end of the first request until we have enough data from the
second request to make it worthwhile to send the responses. In order
to do this, we need to allocate mmap's from the connection pool instead
of the request pool. If we don't use the connection pool, then the mmap
is freed before the data is sent, because the mmap is freed at the end of
the first request.
Ryan Bloom [Sat, 4 Nov 2000 01:30:37 +0000 (01:30 +0000)]
Clean up blocking and non-blocking reads from buckets. The only bucket
that works correctly right now is sockets, but pipes are coming next.
This also makes the http_header_filter do AP_MODE_PEEK correctly.
Jeff Trawick [Fri, 3 Nov 2000 16:38:28 +0000 (16:38 +0000)]
Change the content-length filter to give up (i.e., not provide content-length)
if it gets a flush bucket. A generator of streaming content needs to send down
a flush bucket (e.g., by calling ap_rflush()) if it wants to send a partial
response to the client immediately.
John's patches to provide depreciated messages for the -i and -u
options (now -k install|uninstall), and best yet, restart the console
mode server on Ctrl+Break (Ctrl+C still stops it.)
At least this is the second half - sorry I missed a bit.
Submitted by: John Sterling <sterling@covalent.net>
Reviewed by: William Rowe
John's patches to provide depreciated messages for the -i and -u
options (now -k install|uninstall), and best yet, restart the console
mode server on Ctrl+Break (Ctrl+C still stops it.)
Submitted by: John Sterling <sterling@covalent.net>
Reviewed by: William Rowe
David Reid [Fri, 3 Nov 2000 02:17:56 +0000 (02:17 +0000)]
We don't really want to fool around with socket structures if we don't have to,
and in this case we can get the ip address directly from the socket. This
should mean that if we add more protocol support we don't have to worry about
this. No doubt this is the first of many such changes...
Bill Stoddard [Fri, 3 Nov 2000 01:31:37 +0000 (01:31 +0000)]
Add a new LogFormat directive, %c, that will log connection
status at the end of the response as follows:
'X' - connection aborted before the response completed.
'+' - connection may be kept-alive by the server.
'-' - connection will be closed by the server.
Ryan Bloom [Thu, 2 Nov 2000 20:33:48 +0000 (20:33 +0000)]
Fix the core_output_filter to work with FLUSH buckets. With this change,
when the core sees a FLUSH bucket, we automatically send everything to the
network.
Two patches (sorry), first to clean up the double assignment of the
r->content_type value on UNICODE_FS, and the second to add ETag and
Modified-Date to the file listing. If anyone sees an objection to
this thing, please scream (loudly) before I go and attack 1.3.x with
the ETag/Modified-Date Friday a.m.
Ryan Bloom [Thu, 2 Nov 2000 18:51:08 +0000 (18:51 +0000)]
Create a feature macro that determines if Autoconf was used to configure
the server. The ap_ugly_hack variable is only valid if Autoconf was used
for the configuration.
Jeff Trawick [Thu, 2 Nov 2000 15:42:56 +0000 (15:42 +0000)]
ap_http_header_filter() can't remove itself until after we the
CHUNK filter has been added. Otherwise, f->next won't be the
CHUNK filter and thus the first brigade won't be chunked
properly.
Reported by: wrowe
Greg Stein [Thu, 2 Nov 2000 03:30:36 +0000 (03:30 +0000)]
Simplify the configuration mechanisms for threading in APR.
Revise how Apache configs APR and allow MPMs (or other config scripts) to
pass cmd line params down to APR. For the MPMs that specifically require
or disallow threads, have them force APR threads on/off.
Submitted by: Joe Orton <joe@light.plus.com>
Reviewed by: Greg Stein
Jeff Trawick [Thu, 2 Nov 2000 02:12:34 +0000 (02:12 +0000)]
Get rid of some warnings on Solaris 8 by using APR's ctype macros:
logresolve.c: In function `main':
logresolve.c:327: warning: subscript has type `char'
ab.c: In function `main':
ab.c:1074: warning: subscript has type `char'
ab.c:1087: warning: subscript has type `char'
Jeff Trawick [Wed, 1 Nov 2000 18:42:55 +0000 (18:42 +0000)]
Create the pool bucket after we know the true length, because
(currently) we can't shorten the length of such a bucket by
setting e->length. (We could split and then remove the extra
bucket, but this seems cleaner. We may still want to have a
way to shorten a bucket, but there isn't a pressing need for
that at the moment.)
Joshua Slive [Wed, 1 Nov 2000 18:06:37 +0000 (18:06 +0000)]
Update the main doc page to a two-column format, and add a new section
called "Using the Apache HTTP Server" for task-oriented docs. Also,
remove some of the "other notes" links that are more or less obsolete.
They are still available on a sub-page.
This is a little fancier than the old one, which I know will annoy
some people. Oh well.
The design and HTML coding comes mostly from Carlos, but I messed it
up and changed stuff. Blame Joshua for any errors.
Submitted by: Carlos Ramirez <cramirez@gte.net>, Joshua Slive
Jeff Trawick [Wed, 1 Nov 2000 15:42:50 +0000 (15:42 +0000)]
Fix a buglet in the APR-ization of ap_lingering_close() -- use APR_SO_TIMEOUT
instead of BO_TIMEOUT. (We were actually setting a different socket option.)
Ryan Bloom [Wed, 1 Nov 2000 06:02:22 +0000 (06:02 +0000)]
Fix canned-errors and OPTIONS requests, so that we don't allocate 8k
for the headers. We count the number of bytes we expect to get and only
allocation that many bytes.
Ryan Bloom [Wed, 1 Nov 2000 05:15:25 +0000 (05:15 +0000)]
Stop always allocating 8k for each request. We now count the number
of bytes required for the headers for each request, and we just allocate
that number of bytes plus 100 extra. The extra 100 are a fudge factor,
because it is a bit difficult to compute the exact length for the
basic HTTP headers like date and the status line.
Ryan Bloom [Wed, 1 Nov 2000 00:52:06 +0000 (00:52 +0000)]
Clean up the http filter a lot. Instead of sending a bucket per header,
we now create a single bucket that has all of the headers and send that.
One known issue is that this limits the headers to 8k, but it is a minor
patch to fix that.
This also stops us from exporting ap_send_header_field. This function no
longer makes sense to export.
Jeff Trawick [Tue, 31 Oct 2000 19:59:09 +0000 (19:59 +0000)]
a couple of fixes for byte ranges:
. use %qx format instead of %llx for 64-bit integer (apr_time_t);
%llx prints as "%llx"
. pass offset and length to ap_bucket_create_mmap() so that byte
ranges work with mmaps (at least for a single range)
Ryan Bloom [Tue, 31 Oct 2000 00:47:24 +0000 (00:47 +0000)]
Make mod_cgi and mod_include work when compiled as DSO's again. This is
accomplished by moving suexec out of it's own file and into unixd.[ch].
The problem was that suexec.c wasn't being linked into the server unless
a module was actually using ap_os_create_process. This is still not clean,
but it works now.
Ryan Bloom [Mon, 30 Oct 2000 23:08:27 +0000 (23:08 +0000)]
This is an ugly little hack to allow DSO modules to work. This basically
forces Apache to link in all of the APR functions whether they are used
by any static modules or not.
Jeff Trawick [Thu, 26 Oct 2000 10:48:28 +0000 (10:48 +0000)]
Introduce ap_xlate_proto_{to|from}_ascii() to clean up some of
the EBCDIC support. They are noops on ASCII machines, so this
type of translation doesn't have to be surrounded by #ifdef
CHARSET_EBCDIC.
Jeff Trawick [Wed, 25 Oct 2000 18:54:20 +0000 (18:54 +0000)]
Get rid of the xlate version of ap_md5_digest()
since we don't compute digests of filtered (e.g., translated)
response bodies this way anymore. (Note that we don't do it at
all at the present; somebody needs to write a filter to do so.)
Jeff Trawick [Wed, 25 Oct 2000 17:32:52 +0000 (17:32 +0000)]
On an EBCDIC machine, be willing to translate mod_autoindex-
generated output. Otherwise, it doesn't look too cool.
XXX This isn't a perfect fix because this doesn't trigger us
to convert from the charset of the source code to ASCII. The
general solution seems to be to allow a generator to set an
indicator in the r specifying that the body is coded in the
implementation character set (i.e., the charset of the source
code). This would get several different types of documents
translated properly: mod_autoindex output, mod_status output,
mod_info output, hard-coded error documents, etc.
Jeff Trawick [Wed, 25 Oct 2000 16:49:14 +0000 (16:49 +0000)]
Don't segfault if the filter doesn't have any request config prepared.
This can happen when the config doesn't tell us to do anything but the
administrator coded us in Add{Input|Output}Filter. Instead of segfaulting,
we turn into a noop.
Ok here it is: Win32 utf-8 native unicode filename support.
There are just too many folks to credit... so this goes out from
the entire ApacheCon hacking team :-)
Ryan Bloom [Tue, 24 Oct 2000 18:40:00 +0000 (18:40 +0000)]
Fix mod_include to serve the FAQ correctly. The problem was a couple of
bugs in get_tag. This also allows mod_include to save buckets with partial
tags in them.
Submitted by: Ryan Bloom and David Reid
Jeff Trawick [Tue, 24 Oct 2000 17:21:41 +0000 (17:21 +0000)]
Fix the signature of no_set_limit() to avoid a warning when
AP_DEBUG is defined. (no_set_limit() is compiled only if we
are missing one of the RLIMIT definitions.)
Ryan Bloom [Tue, 24 Oct 2000 16:57:53 +0000 (16:57 +0000)]
Always send the EOS on the correct request. Basically, we call
ap_finalize_request_protocol on the main request, then we find the
last internally re-directed request, and send the EOS on that request.
Jeff Trawick [Tue, 24 Oct 2000 15:49:04 +0000 (15:49 +0000)]
other than minor tweaks:
. mod_charset_lite is now a bit naughty, looking in core_dir_config to see if
its filter is coded in Add{Input|Output}Filter. There are various weird
scenarios that happen when one of the filters gets added both by
mod_charset_lite and due to Add{Input|Output}Filter. It is much nicer (to
the code and to the user) to avoid the problem rather than to trying to
keep things from blowing up when we are misconfigured in this manner.
It may be generally useful to add API functions a module can call to see if
its filter is configured on input/output.
Note that CharsetOptions [No]ImplicitAdd is no longer interesting, but that
code has not yet been removed.
. Fix input filtering so that we handle translating a brigade in multiple
passes when our translation buffer fills up.
. xlate_brigade is cleaned up a bit and hopefully has less bugs
(far too many changes in one commit, but I couldn't access locus from 30,000 feet)
Don't build mod_suexec by default. It breaks other platforms, and
since suexec isn't built by default anyway, it makes sense to treat
mod_suexec similarly.
Jeff Trawick [Tue, 24 Oct 2000 11:38:06 +0000 (11:38 +0000)]
Back out the suexec change to mod_rewrite.c. It now builds again.
(No, it wasn't a simple issue to get the suexec patch working.)
The suexec support doesn't apply to the external mapping process,
which is not related to any particular request. Instead, [IMHO]
the external mapping process should switch to the configured user/group
that the daemon processes switch to.