1
0
mirror of https://github.com/apache/httpd.git synced 2025-11-05 05:30:39 +03:00
Commit Graph

353 Commits

Author SHA1 Message Date
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
David Reid
a737624245 Tidy up some types.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86602 13f79535-47bb-0310-9956-ffa450edef68
2000-10-15 22:42:59 +00:00
Ryan Bloom
b73fb78446 Stop using the index into the array for the bucket type. Now we just use
a pointer to a static structure.  The ap_foo_type functions have also been
replaced with simple macro calls.  I am going to replace the
ap_bucket_(read|split|setaside|destroy) functions with macros soon.
Reviewed by:	Will Rowe


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86597 13f79535-47bb-0310-9956-ffa450edef68
2000-10-15 18:15:13 +00:00
Ryan Bloom
f5ab7f6f10 Add a #else back into http_core.c, so that this compiles on Unix again.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86580 13f79535-47bb-0310-9956-ffa450edef68
2000-10-13 17:36:51 +00:00
William A. Rowe Jr
a286d71463 Completes the port of the <Directory /> handling for Win32... there is
still a patch needed for OS2 ... Brian?


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86579 13f79535-47bb-0310-9956-ffa450edef68
2000-10-13 16:57:21 +00:00
Ryan Bloom
745e689f7c Remove all function pointers from the ap_bucket type. These function
pointers are replaced with a global table that allows modules to register
their bucket types.  Those bucket types are then allowed to be used in
the server processing.  This also required removing all direct calls to
those functions.  The ap_bucket type has an index into an array, so in
each ap_bucket_* function, we use that index to find the correct set of
functions.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86575 13f79535-47bb-0310-9956-ffa450edef68
2000-10-13 05:35:57 +00:00
Ryan Bloom
9a12345722 Remove the offset field from ap_bucket type. This is a file bucket
specific value, and therefore it belongs in the ap_bucket_file type,
which was also created with this commit.  ap_bucket needs to be as generic
as possible to make it easily extensible, which means we have to keep
the generic ap_bucket type very separate from ap_bucket_foo.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86568 13f79535-47bb-0310-9956-ffa450edef68
2000-10-12 18:01:30 +00:00
Ryan Bloom
c27033df76 Implement a length argument on input filters. There are three possible
values for the length, -1, 0, and a positive number.  -1 means that the
next filter should return all the data it has, the current filter will
take care to ensure that the protocol is followed.  Most filters will
never use this, because it implies they are implementing a conn_based
input filter.  0 means give me exactly one line of data.  A positive
number means give me a maximum of n bytes.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86567 13f79535-47bb-0310-9956-ffa450edef68
2000-10-12 16:35:39 +00:00
Jeff Trawick
494d2b064f Get rid of some compile warnings on systems with no sendfile and/or lack of
one or more rlimit controls.  (Solaris 2.8 hits both of these.)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86554 13f79535-47bb-0310-9956-ffa450edef68
2000-10-12 03:17:36 +00:00
Jeff Trawick
4e2d08016b Avoid swap-til-you-drop by cutting off a loop once the client closes.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86551 13f79535-47bb-0310-9956-ffa450edef68
2000-10-12 01:50:51 +00:00
Ryan Bloom
3c11b9990c Cleanup the input filtering a bit. This does not work with telnet
currently, but it is a step in the right direction.  Input filtering
should be slowly improving from here on out.
Submitted by:	Greg Ames, Ryan Bloom, Jeff Trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86547 13f79535-47bb-0310-9956-ffa450edef68
2000-10-11 18:32:19 +00:00
Ryan Bloom
af3351bb19 Back out the change to move the core_output_filters brigade to the
conn_rec.  Since all requests on a given connection use the same
core_output_filter, the ctx in that filter has the correct lifetime


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86494 13f79535-47bb-0310-9956-ffa450edef68
2000-10-10 03:35:11 +00:00
Jeff Trawick
142f72090c rename core_register_filter() to core_insert_filter()
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86491 13f79535-47bb-0310-9956-ffa450edef68
2000-10-10 02:14:11 +00:00
Jeff Trawick
9e5bc087a1 core_input_filter():
remove old code which looked for LF
  return apr_status_t value instead of length


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86490 13f79535-47bb-0310-9956-ffa450edef68
2000-10-10 02:10:42 +00:00
Ryan Bloom
5e891204a4 Remove an annoying warning.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86487 13f79535-47bb-0310-9956-ffa450edef68
2000-10-09 23:11:21 +00:00
Bill Stoddard
89c398aa0c Fix another bug in the send_the_file() read/write loop. A partial
send by apr_send would cause unsent data in the read buffer to
 get clobbered. Complete making send_the_file handle partial
 writes to the network.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86485 13f79535-47bb-0310-9956-ffa450edef68
2000-10-09 22:08:49 +00:00
Ryan Bloom
4b7bc4b099 Fix some types in the latest tree, so that AIX builds cleanly again.
Submitted by:   Victor J. Orlikowski <v.j.orlikowski@gte.net>
Reviewed by:    Ryan Bloom


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86484 13f79535-47bb-0310-9956-ffa450edef68
2000-10-09 19:03:27 +00:00
Bill Stoddard
818f94113f Initialize nbytes across each iteration and not just after a call to writev_it_all.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86479 13f79535-47bb-0310-9956-ffa450edef68
2000-10-09 18:02:45 +00:00