1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-27 16:41:57 +03:00
Commit Graph

220 Commits

Author SHA1 Message Date
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
Ryan Bloom
4b173d707a The headers need to be at the end of the request_based filters.
Submitted by:	Jon Travis <jtravis@covalent.net>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86703 13f79535-47bb-0310-9956-ffa450edef68
2000-10-22 15:26:05 +00:00
Jeff Trawick
807983f2e7 namespace-protect dechunk_filter and http_filter
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86699 13f79535-47bb-0310-9956-ffa450edef68
2000-10-22 13:09:23 +00:00
Ryan Bloom
9fbdac023f 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.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86687 13f79535-47bb-0310-9956-ffa450edef68
2000-10-21 14:20:14 +00:00
Jeff Trawick
96cf82e63b Input filters and ap_get_brigade() now have a input mode parameter
(blocking, non-blocking, peek) instead of a length parameter.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86684 13f79535-47bb-0310-9956-ffa450edef68
2000-10-21 13:20:36 +00:00
Bill Stoddard
bf1eb0532d Rename buffer_filter to coalesce_filter.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86683 13f79535-47bb-0310-9956-ffa450edef68
2000-10-21 12:38:17 +00:00
Ryan Bloom
140586d14f Namespace protect the rest of the macros defined by ap_config.h
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86661 13f79535-47bb-0310-9956-ffa450edef68
2000-10-19 00:05:00 +00:00
Ryan Bloom
0dbda593ad Make the core access the socket directly instead of going through the
BUFF.  This doesn't actually change any behavior, it just makes the core
access socket directly.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86652 13f79535-47bb-0310-9956-ffa450edef68
2000-10-18 19:32:30 +00:00
Ryan Bloom
2e8c484fd4 Use pool buckets where appropriate. The places I have found so far, are
the buffer_filter, and where the core_filter gets data from the BUFF.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86635 13f79535-47bb-0310-9956-ffa450edef68
2000-10-17 22:34:14 +00:00
Jeff Trawick
ce0a65bfd6 Rename output filters field ("filters") in core_dir_config to
"output_filters" for consistency with the name of the input
filters field ("input_filters").


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86623 13f79535-47bb-0310-9956-ffa450edef68
2000-10-17 01:35:12 +00:00
Ryan Bloom
86a1ecbda0 Add a flush bucket type. This bucket advises filters to flush any data
they are currently storing.  There is no way we can force them to flush,
but we can advise.  This also adds the code to ap_rflush to use flush
buckets, although it isn't enabled yet.  I will enable it once we remove
buff from the code.  I also removed all calls to ap_rflush that are either
immediately before or immediately after a call to ap_finalize_protocol.
ap_finalize_protocol sends an EOS bucket, which also advises filters to
flush their data, so having both calls right next to each other is
redundant.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86619 13f79535-47bb-0310-9956-ffa450edef68
2000-10-17 00:24:36 +00:00
Ryan Bloom
25535f86ec Add a sub-request filter. This filter just strips the EOS from the
brigade generated by the sub-request.  If this is not done, then the
main-request's core_output_filter will get very confused, as will any other
filter in the main-request filter-stack that looks for EOS.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86618 13f79535-47bb-0310-9956-ffa450edef68
2000-10-16 23:15:55 +00:00
Jeff Trawick
eb7793f871 input filtering changes:
get dechunking working
  verify that infrastructure for input filters works
    (use existing AddInputFilter directive)

Unlike with my previous patch, ap_get_client_block() saves state between
calls in the core's per-request dir config.

Unlike with my previous patch, HTTP_IN keeps a count of remaining bytes
in the conn_rec.  Code that needs to prod it to deliver a certain amount
of request body plays with conn_rec->remain directly.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86613 13f79535-47bb-0310-9956-ffa450edef68
2000-10-16 19:11:53 +00:00
William A. Rowe Jr
d6490633eb Renamed all MODULE_EXPORT symbols to AP_MODULE_DECLARE and all symbols
for CORE_EXPORT to AP_CORE_DECLARE (namespace protecting the wrapper)
  and retitled API_EXPORT as AP_DECLARE and APR_EXPORT as APR_DECLARE.
  All _VAR_ flavors changes to _DATA to be absolutely clear.
  Thank you Greg, for the most obvious suggestion.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86609 13f79535-47bb-0310-9956-ffa450edef68
2000-10-16 06:05:15 +00:00