1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-08 15:02:10 +03:00

383 Commits

Author SHA1 Message Date
Ryan Bloom
bc1891795e Modify a couple of calls to ap_log_error with a NULL server to use
ap_log_perror, and pass a pool.  The keeps us from seg faulting if the
error log hasn't been opened yet.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87565 13f79535-47bb-0310-9956-ffa450edef68
2001-01-02 01:34:05 +00:00
Ryan Bloom
74383a7cae Because we can't get APR_EAGAIN from sendfile if we have a timeout, we
can simplify this test now.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87545 13f79535-47bb-0310-9956-ffa450edef68
2000-12-28 23:27:20 +00:00
Ryan Bloom
39a2364a52 If we get EAGAIN returned from apr_sendfile, then we need to loop back and
call it again.  This change allows us to serve large files (such as
apache_2.0a9.tar.gz) using Apache 2.0 on FreeBSD.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87514 13f79535-47bb-0310-9956-ffa450edef68
2000-12-22 23:43:16 +00:00
Jeff Trawick
50cca38301 Remove an IPv4 dependency in do_double_reverse() by calling
apr_getaddrinfo() instead of gethostbyname().


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87402 13f79535-47bb-0310-9956-ffa450edef68
2000-12-18 20:31:17 +00:00
Jeff Trawick
fbeea294ef Stop using apr_get_hostname(). It doesn't support IPv6 and it
is redundant.  apr_getnameinfo() provides the same function.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87396 13f79535-47bb-0310-9956-ffa450edef68
2000-12-18 16:49:09 +00:00
Jeff Trawick
b1e8b050e9 The local_addr and remote_addr fields in the conn_rec are now
apr_sockaddr_t * instead of sockaddr_in.  This is a small step
towards IPv6 support.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87342 13f79535-47bb-0310-9956-ffa450edef68
2000-12-14 18:47:30 +00:00
Jeff Trawick
d870b177bd Fix some lvalue casts so that we can compile with xlc on AIX.
Submitted by:	"Victor J. Orlikowski" <v.j.orlikowski@gte.net>
Reviewed by:	Jeff Trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87104 13f79535-47bb-0310-9956-ffa450edef68
2000-11-28 18:57:31 +00:00
Jeff Trawick
9fca860fbd fix an apr_size_t/apr_ssize_t discrepancy
Submitted by:	Victor J. Orlikowski


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87097 13f79535-47bb-0310-9956-ffa450edef68
2000-11-28 00:17:38 +00:00
Greg Stein
ead2dae94c *) Compensate for recent changes in the APR headers. Specifically, some
files need to specifically include stdio.h, or a particular apr_*.h
   header.

*) Adjust callers of apr_create_process() to deal with the extra "const"

*) Add "const" to args of ap_os_create_privileged_process()


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87080 13f79535-47bb-0310-9956-ffa450edef68
2000-11-26 04:47:43 +00:00
Ryan Bloom
02f60b7ea4 Allow modules to specify the first module for a sub-request. This allows
modules to not have to muck with the output_filter after it creates the
sub-request.  Without this change, modules that create a sub-request have
to manually edit the output_filters, and therefore skip the sub-request
output_filter.  If they skip the sub-request output_filter, then we end
up sending multiple EOS buckets to the core_output_filter.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87065 13f79535-47bb-0310-9956-ffa450edef68
2000-11-22 19:38:07 +00:00
Ryan Bloom
798d259441 Modify the content-length filter to change the criteria used to determine
if/when we compute the content-length.  There are just a few cases now:

        1) We already have all the data
        2) We don't have all the data and:
                2a)  This is a 1.1 request but we can't chunk
                2b)  The is a keep-alive request
	    In the future, we probably want to modify this to not
	    be a keep-alive request.

This filter always buffers 9K of data.  The reason is simple, the core will
buffer 9K at a time anyway, and there is a chance that we may get the end
of the request before we hit 9K.  This increases our chances of being able
to send a c-l.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87055 13f79535-47bb-0310-9956-ffa450edef68
2000-11-21 20:17:20 +00:00
Jeff Trawick
d4df2029ae updates to changed interfaces to apr_set_port(), apr_get_port(),
apr_set_ipaddr(), and apr_get_ipaddr()


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87050 13f79535-47bb-0310-9956-ffa450edef68
2000-11-21 19:10:25 +00:00
Greg Ames
6de8f5e454 Add partial write support for apr_sendfile to core_output_filter.
Big .jpg's ( >70K or so) were being truncated on Linux.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87041 13f79535-47bb-0310-9956-ffa450edef68
2000-11-20 22:39:17 +00:00
Ryan Bloom
7e991c23f8 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.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86955 13f79535-47bb-0310-9956-ffa450edef68
2000-11-14 06:11:24 +00:00
Ryan Bloom
22587a3209 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.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86952 13f79535-47bb-0310-9956-ffa450edef68
2000-11-14 04:22:03 +00:00
Jeff Trawick
eb2e6db97a Get http_core to compile again after the last change.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86949 13f79535-47bb-0310-9956-ffa450edef68
2000-11-14 02:13:41 +00:00
Ryan Bloom
1a00f1aaeb 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.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86947 13f79535-47bb-0310-9956-ffa450edef68
2000-11-14 01:46:39 +00:00
Ryan Bloom
d741d6832c Get the default_handler to use the bucket code directly. This keeps us
from traveling down the stack multiple time for a static page.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86944 13f79535-47bb-0310-9956-ffa450edef68
2000-11-13 23:42:40 +00:00
Bill Stoddard
a6e345e104 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.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86943 13f79535-47bb-0310-9956-ffa450edef68
2000-11-13 22:52:19 +00:00
Ryan Bloom
f53ac5876c 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.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86938 13f79535-47bb-0310-9956-ffa450edef68
2000-11-13 14:19:41 +00:00
David Reid
2377bb2ae0 More local/remote changes and tidy up http_vhost a bit.
Also add a new function to get an ap_ina_addr_t from a socket.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86910 13f79535-47bb-0310-9956-ffa450edef68
2000-11-10 16:11:14 +00:00
Ryan Bloom
3ce94ea58f 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.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86894 13f79535-47bb-0310-9956-ffa450edef68
2000-11-09 22:05:40 +00:00
Jeff Trawick
e935210c99 Simplify the call to ap_send_fd().
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86888 13f79535-47bb-0310-9956-ffa450edef68
2000-11-09 13:36:01 +00:00
Ryan Bloom
07390aa8cf Use the content-length filter to compute the content-length for byterange
requests.  This allows the byterange filter to work with the PDF plug-in.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86880 13f79535-47bb-0310-9956-ffa450edef68
2000-11-09 03:33:24 +00:00
David Reid
ee4d19790d This adds the APR_LOCAL/APR_REMOTE to APR and changes the apr_get/set_port
functions to use it.  This is onyl the start and I'll pause a while before
I continue in case people really hate this.  The patch can be backed out and
all evidence will be removed, but I think this makes maintaining/developing
the code easier in the long term.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86870 13f79535-47bb-0310-9956-ffa450edef68
2000-11-08 14:47:33 +00:00
David Reid
73a6c4c81f Doh! Missed this from the last commit...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86868 13f79535-47bb-0310-9956-ffa450edef68
2000-11-08 11:48:09 +00:00
David Reid
33aabfee3f Start of moving to apr_port_t in the server code. This will probably the first
of a few...


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86866 13f79535-47bb-0310-9956-ffa450edef68
2000-11-08 11:35:38 +00:00
Ryan Bloom
16d27f0da6 The byte-ranges filter. This looks like it should work, but the
Acrobat plug-in doesn't like it for some reason.  This does work better
than what we currently have, because at least it returns all of the
requested data.  This basically removes all BUFFs from the byte-range
code and removes all of the byte-range code from the default-handler.

Byte-ranges are now handled by a filter, which makes sense, and it allows
us to handle byte-ranges for all requests, not just files.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86864 13f79535-47bb-0310-9956-ffa450edef68
2000-11-08 06:24:47 +00:00
Ryan Bloom
0225f3424a Fix a compile break. ap_set_content_length is a void function now, so we
can't check the return code.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86862 13f79535-47bb-0310-9956-ffa450edef68
2000-11-08 02:46:00 +00:00
Ryan Bloom
134dbc9e7a Convert a lot of apr_ssize_t to apr_size_t. We don't ever accept or return
signed values in these integers, and we return the error codes directly,
so we should always report the number of bytes read/written correctly.  If
we have an error, that is 0 bytes.  If that is true, then using signed
values doesn't make any sense.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86857 13f79535-47bb-0310-9956-ffa450edef68
2000-11-07 20:21:55 +00:00
Jeff Trawick
d1e7726a30 Make the desired evaluation explicit to keep gcc -Wall happy.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86844 13f79535-47bb-0310-9956-ffa450edef68
2000-11-06 17:32:13 +00:00
Ryan Bloom
3f0129d314 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.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86840 13f79535-47bb-0310-9956-ffa450edef68
2000-11-05 04:06:17 +00:00
Ryan Bloom
231c702237 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.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86830 13f79535-47bb-0310-9956-ffa450edef68
2000-11-04 01:30:37 +00:00
Sascha Schumann
6d89d14d4e Remove REQUEST_CHUNKED_PASS and change ap_discard_request_body()
to use REQUEST_CHUNKED_DECHUNK.

Because of this change, the need for handle_request_body() is gone,
so we remove that as well.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86827 13f79535-47bb-0310-9956-ffa450edef68
2000-11-03 17:34:59 +00:00
Jeff Trawick
d7430d77c2 Axe a couple of newly-unused variables.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86825 13f79535-47bb-0310-9956-ffa450edef68
2000-11-03 15:56:42 +00:00
David Reid
bd165c3eea More removal of raw sockaddr references. This shouldn't cause any problems,
but folks may want to test it :)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86823 13f79535-47bb-0310-9956-ffa450edef68
2000-11-03 15:08:06 +00:00
David Reid
23b9976221 Another removal of using raw sockaddr where we should be using APR.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86822 13f79535-47bb-0310-9956-ffa450edef68
2000-11-03 14:48:40 +00:00
Ryan Bloom
4cc33e90f7 It doesn't make any sense to set a CHUNK flag in the BUFF, because the
BUFF isn't used for output anymore.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86811 13f79535-47bb-0310-9956-ffa450edef68
2000-11-02 22:53:57 +00:00
Sascha Schumann
f397734b03 Fix last commit which was done from the wrong tree which contained
an incomplete version of the default_handler change.

This version gets always rid of the request body, regardless of the
method.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86809 13f79535-47bb-0310-9956-ffa450edef68
2000-11-02 21:31:37 +00:00
Sascha Schumann
0e6c7a8b3b Make the default handler read the dechunked request body on a POST request.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86806 13f79535-47bb-0310-9956-ffa450edef68
2000-11-02 20:48:48 +00:00
Ryan Bloom
f46ebf0d3e 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.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86805 13f79535-47bb-0310-9956-ffa450edef68
2000-11-02 20:33:48 +00:00
Jeff Trawick
1cd4c73541 In writev_it_all(), tell the caller how many bytes were sent.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86798 13f79535-47bb-0310-9956-ffa450edef68
2000-11-02 12:27:05 +00:00
Jeff Trawick
ad7545f0b4 Compute the content length (and add appropriate header field) for
the response when no content length is available and we can't use
chunked encoding.

This is going to be painful when the response body is huge, so I
suspect we'll have additional criteria in the future.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86775 13f79535-47bb-0310-9956-ffa450edef68
2000-10-31 12:30:22 +00:00
Jeff Trawick
9fd450b8ec Clean up a few incompatible pointer types (int * vs. unsigned int *).
Submitted by:	Cliff Woolley <cliffwoolley@yahoo.com>
Reviewed by:	Jeff Trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86755 13f79535-47bb-0310-9956-ffa450edef68
2000-10-26 12:03:07 +00:00
Jeff Trawick
6217bc8f88 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.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86751 13f79535-47bb-0310-9956-ffa450edef68
2000-10-26 10:48:28 +00:00
Jeff Trawick
66f97567e9 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.)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86750 13f79535-47bb-0310-9956-ffa450edef68
2000-10-25 18:54:20 +00:00
Jeff Trawick
d2ee323dc2 EBCDIC: Make chunk_filter() write chunk headers/trailers in ASCII.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86747 13f79535-47bb-0310-9956-ffa450edef68
2000-10-25 15:42:38 +00:00
Tony Finch
718ef1c880 ensure that all cpp directives start with a # in column one
PR: 6742


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86745 13f79535-47bb-0310-9956-ffa450edef68
2000-10-25 15:03:03 +00:00
Jeff Trawick
8834cc5296 Introduce more filter types. This gets chunking of output working
again by ensuring that the chunk filter gets added after the http
headers filter.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86739 13f79535-47bb-0310-9956-ffa450edef68
2000-10-25 00:38:04 +00:00
Jeff Trawick
9b9b84c104 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.)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86736 13f79535-47bb-0310-9956-ffa450edef68
2000-10-24 17:21:41 +00:00