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.
Remove an attempt to fix a race condition. The attempt is not
successful, the race condition is not particularly important (people
deleting users in the middle of a request), and the attempt introduces
more thread-safeness problems. Oh, and I thought I had taken this out
already. :)
A more thorough example is appropriate. Also simplify the behavior and
always return root (/) if n < 1, which is no worse than returning elems
if n > elems.
Add a temporary pool argument to unixd_pre_config, so that it can call
APR functions (grumble). This is needed for apr_stat, which will be in
the suexec path coming up.
Ryan Bloom [Mon, 23 Oct 2000 10:46:20 +0000 (10:46 +0000)]
Make lingering close access the socket directly, instead of relying on
BUFF. This has been tested, but all we can determine is that it doesn't
fail, not that it works. This needs to be tested much better.
Bill Stoddard [Sun, 22 Oct 2000 15:48:34 +0000 (15:48 +0000)]
Correct a check to see if we are attempting to remove a filter that has
already been removed from the stack. Hummm, seems to me we should not
attempt to remove filters multiple times....
Bill Stoddard [Sun, 22 Oct 2000 15:20:08 +0000 (15:20 +0000)]
Fix problem where a 304 response was not generating an EOS bucket.
ap_finalize_request_protocol()'s sole purpose in Apache 2.0 is to
send the EOS bucket. Probably need to reimplement ap_send_error_response()
to be consistent with ap_finalize...'s new mission.