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.
Ryan Bloom [Sat, 21 Oct 2000 14:20:14 +0000 (14:20 +0000)]
Hack headers to work semi-properly. This is a hack that will need to be
fixed, but it is good enough for now. The idea is that headers shouldn't
flow through the BUFF anymore. Now, we have a header filter that is
called at the end of the request-filter chain. This filter writes the
headers directly to the connection filters.
Jeff Trawick [Sat, 21 Oct 2000 14:07:41 +0000 (14:07 +0000)]
Get translation of request bodies working.
This code is pretty ugly, but I need to checkpoint (and this stuff
actually works).
The direction: Get xlate_brigade() working for output too, then
kill the analogous code in xlate_out_filter(). At that point, the
same translation code works for input and output.
Tony Finch [Thu, 19 Oct 2000 19:24:51 +0000 (19:24 +0000)]
Belatedly update the documentation to include the NameVirtualHost *
stuff. This isn't quite a sync with the 1.3 docco because we don't
want to mention 1.3 in the 2.0 docs.
Tony Finch [Thu, 19 Oct 2000 19:15:14 +0000 (19:15 +0000)]
Belatedly update the documentation to include the NameVirtualHost *
stuff. This isn't quite a sync with the 1.3 docco because we don't
want to mention 1.3 in the 2.0 docs.
Greg Stein [Thu, 19 Oct 2000 10:43:03 +0000 (10:43 +0000)]
somebody was a Very Bad Boy when they inserted casts into this function.
casting away the const was absolutely wrong... the warnings were saying the
return value type needed to be fixed. did that and torched the casts.