1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-05 16:55:50 +03:00

560 Commits

Author SHA1 Message Date
Doug MacEachern
46a6922999 backing out the ap_set_keepalive uncheck for Content-Length header
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90707 13f79535-47bb-0310-9956-ffa450edef68
2001-08-26 20:09:52 +00:00
Doug MacEachern
1a461cd85c ap_content_length_filter has already set Content-Length
before ap_set_keepalive is called.  need to remove this check
in order for keepalives to work.
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90700 13f79535-47bb-0310-9956-ffa450edef68
2001-08-26 18:57:16 +00:00
William A. Rowe Jr
d9dee61f75 Readded "downgrade-1.0" which I (inadvertantly) pulled with the
map_to_storage patch.  I knew it had to have a better home, and
  it sure looks like this is it.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90683 13f79535-47bb-0310-9956-ffa450edef68
2001-08-26 04:59:37 +00:00
William A. Rowe Jr
307ab55886 Introduce the map_to_storage hook, which allows modules to bypass
the directory_walk and file_walk for non-file requests.  TRACE
  shortcut moved to http_protocol.c as APR_HOOK_MIDDLE, and the
  directory_walk/file_walk happen as APR_HOOK_VERY_LAST in core.c.

  A seperate patch to mod_proxy is required to short circuit both the
  TRACE and directory_walk/file_walk stuff.  That patch is next.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90665 13f79535-47bb-0310-9956-ffa450edef68
2001-08-25 23:43:19 +00:00
Cliff Woolley
95a67f5150 Just a little extra commentary...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90649 13f79535-47bb-0310-9956-ffa450edef68
2001-08-24 20:38:27 +00:00
Cliff Woolley
64dd7641e7 Fix a double-free condition when byterange requests are made on brigades
containing any bucket that cannot be copied natively (ie, pipe or socket
buckets).

Before, we were reading that bucket to morph it to a heap bucket and then
taking the str that heap bucket points to and placing it in a second,
completely separate heap bucket.  That means we'd have two apr_bucket/
apr_bucket_heap pairs each with a refcount of 1 (rather than two apr_buckets
and a single apr_bucket_heap with a refcount of 2).  str would then be
doubly-freed when the second of those two buckets was destroyed.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90648 13f79535-47bb-0310-9956-ffa450edef68
2001-08-24 20:27:40 +00:00
Doug MacEachern
d79cea3d70 enable ssl Translate, UserCheck, Access and Auth hooks
add support for renegotiation during the Access hook
this requires hooking into the read and write SSL BIOs in order to
flush data to the client and read from the filter chain

this also requires that the ssl filters become "aware" that
renegotitation is in progress so that the BIOs are left alone for
SSL_renegotiate/SSL_do_handshake in ssl_hook_Access to deal with

PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90185 13f79535-47bb-0310-9956-ffa450edef68
2001-08-16 03:58:16 +00:00
Ryan Bloom
6e932b2870 Fix the new method code. We need to cast 1 to an apr_int64_t or it will
be treated as a 32-bit integer, and it will wrap after being shifted
32 times.
Submitted by:	Cody Sherr <csherr@covalent.net> and
		Ryan Morgan <rmorgan@covalent.net>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90090 13f79535-47bb-0310-9956-ffa450edef68
2001-08-11 04:04:13 +00:00
Ryan Bloom
a2cab6eda2 This should fix the remaining problems with POST. Basically, we
add a new macro, called APR_BRIGADE_NORMALIZE.  This macro searches
all the buckets, and removes any zero length bucket.  They we can
just use APR_BRIGADE_EMPTY to determine if our brigade has any data,
and we can quickly call ap_get_brigade if it doesn't.

Doug, please throw your battery of tests at this to make sure it works.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90070 13f79535-47bb-0310-9956-ffa450edef68
2001-08-10 18:35:08 +00:00
Ryan Bloom
4b239f39d3 If we are going to get the length of a brigade, it helps if that
brigade has data.  To that end, if we have just expanded ctx->b, we need
to concat ctx->b to the end of b, so that b has something to pass
back to the previous filter.

This fixes the problem with the proxy not proxying non-keepalive
connections.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90046 13f79535-47bb-0310-9956-ffa450edef68
2001-08-09 04:56:23 +00:00
Ryan Bloom
9d615b23da Add a comment so that the next poor fool who re-writes this section
of code will know about this case.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90045 13f79535-47bb-0310-9956-ffa450edef68
2001-08-09 04:25:46 +00:00
Ryan Bloom
979df5fa53 Handle the -1 case in ap_http_filter. -1 means that we have to read
all data from the socket until the socket is closed.  This has been
used to proxy www.google.com successfully, but it doesn't return anything
when used with www.yahoo.com.  Still debugging that problem.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90044 13f79535-47bb-0310-9956-ffa450edef68
2001-08-09 04:21:26 +00:00
Ryan Bloom
6513c027a7 Remove the block argument from apr_brigade_partition. This looked good
in theory, but in reality, we should just rely on the timeouts to handle
this.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90043 13f79535-47bb-0310-9956-ffa450edef68
2001-08-08 22:24:04 +00:00
Ryan Bloom
0e959b94c7 Re-apply the patch from yesterday that makes ap_http_filter use
apr_brigade_partition.  In order to do this cleanly, I had to make
some changes to the apr_brigade_partition API, so this also adds fixes
all of the calls to that function throughout the server.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90029 13f79535-47bb-0310-9956-ffa450edef68
2001-08-08 15:42:08 +00:00
Doug MacEachern
3712a19778 this change breaks POST, backing out for the moment
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90003 13f79535-47bb-0310-9956-ffa450edef68
2001-08-07 19:54:06 +00:00
William A. Rowe Jr
cd6a44feef Must return something in the 2^32 domain (preferably one, as shown here),
not in the 2^64 domain.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89998 13f79535-47bb-0310-9956-ffa450edef68
2001-08-07 18:37:04 +00:00
Ryan Bloom
9fc8386d20 Greatly simplify the ap_http_filter logic, by using the
apr_brigade_partition function.  This should also remove a warning from
the Windows build, because apr_off_t and apr_size_t aren't the same
size.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89997 13f79535-47bb-0310-9956-ffa450edef68
2001-08-07 17:57:44 +00:00
William A. Rowe Jr
58c8930a02 Just cleaning up some indents
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89991 13f79535-47bb-0310-9956-ffa450edef68
2001-08-07 16:40:29 +00:00
Ryan Bloom
cf2e6a1831 Remove all warnings from the input filtering stack.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89987 13f79535-47bb-0310-9956-ffa450edef68
2001-08-07 16:19:03 +00:00
William A. Rowe Jr
0b6c2c7005 Make this legible. Points out a huge headache in the new conftree pools
mechanism, that we aren't joined properly, so we hit the 'not ancestor'
  abend here.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89880 13f79535-47bb-0310-9956-ffa450edef68
2001-08-02 19:37:46 +00:00
Ryan Bloom
85e8fbd0e2 Add the ability to extend the methods that Apache understands
and have those methods <limit>able in the httpd.conf. It uses
the same bit mask/shifted offset as the original HTTP methods
such as M_GET or M_POST, but expands the total bits from an int to
an ap_int64_t to handle more bits for new request methods than
an int provides.
Submitted by:	Cody Sherr <csherr@covalent.net>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89869 13f79535-47bb-0310-9956-ffa450edef68
2001-08-02 04:25:20 +00:00
William A. Rowe Jr
3db17f7926 Restore to 1.333 state (problematic, in that we could be facing >(size_t)
bytes, but better till I figure out the _right_ fix.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89853 13f79535-47bb-0310-9956-ffa450edef68
2001-08-01 04:08:36 +00:00
William A. Rowe Jr
8ae10a2a98 A bit of Saturday a.m. XHTML Transitional 1.0 compatibility changes.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89779 13f79535-47bb-0310-9956-ffa450edef68
2001-07-30 04:19:57 +00:00
William A. Rowe Jr
bb2fc524c9 Final pedantic HTML 3.2/4.01 Transitional + XHTML 1.0 Transitional
compliance changes.  Note I've left alone the <P> tags, since they
  are abused, misused, potentially unsalvageable and certainly more
  effort than I care to expend in my quest for brainless end of week
  keyboard exercise.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89753 13f79535-47bb-0310-9956-ffa450edef68
2001-07-28 01:29:41 +00:00
Cliff Woolley
de7d0daac0 Fix printf() warnings related to long->apr_off_t swap
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89738 13f79535-47bb-0310-9956-ffa450edef68
2001-07-26 18:40:27 +00:00
William A. Rowe Jr
3e6771f3d3 Something that needs looking at, all our long (unsigned long) body
lengths need to become apr_off_t.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89732 13f79535-47bb-0310-9956-ffa450edef68
2001-07-26 17:12:29 +00:00
William A. Rowe Jr
cac7abfbb5 This patch should address input buffering, requesting only as much from
the client as the ap_get_client_block() buffer is prepared to accept.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89728 13f79535-47bb-0310-9956-ffa450edef68
2001-07-26 16:05:36 +00:00
William A. Rowe Jr
5b71e358f3 Change the length of the content args to apr_off_t identifiers, and fix
mod_negotation to treat a size of -1 and indeterminate, instead of 0.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89727 13f79535-47bb-0310-9956-ffa450edef68
2001-07-26 15:53:15 +00:00
William A. Rowe Jr
7b2c62a74e Changes to respect the new apr bucket and brigade length types (either
apr_size_t for bucket lengths, or apr_off_t for aggregate brigade lengths.)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89683 13f79535-47bb-0310-9956-ffa450edef68
2001-07-24 20:38:01 +00:00
Bill Stoddard
de06ddf627 Fix problem with the previous patch to handle HEAD requests. Now, the
header_filter will stay installed in the filter chain when processing
HEAD requests to intercept and discard content bodys sent by poorly
written handlers. This work also points out the need for an optimization
in the content_length filter to not split the brigade if the next bucket
in the brigade is an EOS.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89679 13f79535-47bb-0310-9956-ffa450edef68
2001-07-24 17:24:05 +00:00
Bill Stoddard
204e7c5e42 Fix problem reported by Taketo Kabe <kabe@sra-tohoku.co.jp>
where HEAD response headers were being repeated twice for
files greater than 32K bytes (4*AP_MIN_BYTES_TO_WRITE). This
problem in the http_header filter was exposed by the recent rewrite
of the content_length filter.
[Taketo Kabe, Bill Stoddard]

PR: 8037


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89676 13f79535-47bb-0310-9956-ffa450edef68
2001-07-24 14:36:29 +00:00
Doug MacEachern
1a44af4868 only reset request level filters in reset_filters(), else for example
TLSFilter gets wiped out, breaking any response that comes through ap_die
(including the frequent '304 not modified')
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89601 13f79535-47bb-0310-9956-ffa450edef68
2001-07-18 19:52:40 +00:00
Cliff Woolley
c721f48845 Avoid redundant strlen() calls by using apr_brigade_write() instead of
apr_brigade_puts().  There is still some redundancy--it'd be ideal if there
were an apr_pstrcat() variant that returned the length of the string since
it computes it (twice) anyway so we didn't have to do it yet again.  Until
such a beast exists, computing the length three times is better than four.
:-/


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89516 13f79535-47bb-0310-9956-ffa450edef68
2001-07-08 06:24:55 +00:00
David Reid
bb2ac7e982 s/cont/pool/
This gets us building again after the change in APR.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89510 13f79535-47bb-0310-9956-ffa450edef68
2001-07-07 16:20:45 +00:00
Cliff Woolley
c091130eab * apr_brigade_partition() now returns an apr_status_t (finally!).
* did some code cleanups/optimizations in that function.
* updated Apache's byterange filter to handle the new prototype. added
  error handling to the byterange filter should apr_brigade_partition()
  ever fail, which it never will unless somebody either removes the earlier
  call to apr_brigade_length() for some unknown reason or invents a new
  bucket type that is of a predetermined length but which cannot be split
  natively (or which has a split that might fail).  might as well be
  future-proof.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89363 13f79535-47bb-0310-9956-ffa450edef68
2001-06-13 16:48:37 +00:00
Ryan Bloom
66a61c359d Add a pool to the ap_save_brigade prototype. This removes a todo from
the comments that is really necessary before the setaside stuff will
work properly.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89362 13f79535-47bb-0310-9956-ffa450edef68
2001-06-13 13:44:40 +00:00
Jeff Trawick
e1464feb18 use apr-util's apr_date_parse_http() instead of the to-be-removed
ap_parseHTTPdate()

(proxy needs to make similar changes)

build changes forthcoming...

Submitted by:	Justin Erenkrantz


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89277 13f79535-47bb-0310-9956-ffa450edef68
2001-06-06 19:30:54 +00:00
Ryan Bloom
2abe50dc9a Fix the reset_filters function. If we set r->output_filters to NULL,
then we also have to reset the connection's filters.
Submitted by:	John Sterling <sterling@covalent.net>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89269 13f79535-47bb-0310-9956-ffa450edef68
2001-06-04 21:43:08 +00:00
Graham Leggett
a10b0be85c Optimise reset_filter() in http_protocol.c
PR:
Obtained from:
Submitted by:	Greg Stein
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89256 13f79535-47bb-0310-9956-ffa450edef68
2001-06-01 22:14:01 +00:00
Jeff Trawick
551ecb9a9a Fix processing of the TRACE method. Previously we passed bogus
parms to form_header_field() and it overlaid some vhost structures,
resulting in a segfault in check_hostalias().
[Greg Ames, Jeff Trawick]

Note: Not being familiar with the TRACE method I compared the 2.0
output with 1.3.9 output.  The only difference is that with 2.0 we
get a Content-Length header field.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89138 13f79535-47bb-0310-9956-ffa450edef68
2001-05-17 18:04:18 +00:00
Chuck Murcko
86154b12b2 Add the AP_DECLARE()/AP_CORE_DECLARE macros on the return types of
functions used by mod_proxy for export in DLL
Submitted by:	Ian Holsman <IanH@cnet.com>
Reviewed by:	Chuck murcko


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89078 13f79535-47bb-0310-9956-ffa450edef68
2001-05-11 04:35:41 +00:00
Ryan Bloom
1c98aabbf1 Back out the recent change to ap_get_brigade, to make it use indirection
again.  The problem is that the amount of data read from the network,
is not necessarily the amount of data returned from the filters.  It is
possible for input filters to add bytes to the data read from the network.

To fix the original bug, I just removed the line from ap_get_client_block
that decremented r->remaining, we allow the http_filter to do that for
us.

I have also removed an incorrect comment.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89041 13f79535-47bb-0310-9956-ffa450edef68
2001-05-06 23:27:14 +00:00
Greg Stein
5cba6d7345 Fix a bug in the input handling. ap_http_filter() was modifying *readbytes
which corresponded to r->remaining (in ap_get_client_block). However,
ap_get_client_block was *also* adjusting r->remaining. Net result was that
PUT (and probably POST) was broken. (at least on large inputs)

To fix it, I simply removed the indirection on "readbytes" for input
filters. There is no reason for them to return data (the brigade length is
the return length). This also simplifies a number of calls where people
needed to do &zero just to pass zero.

I also added a number of comments about operations and where things could be
improved, or are (semi) broken.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89008 13f79535-47bb-0310-9956-ffa450edef68
2001-05-05 11:18:01 +00:00
Ryan Bloom
eb94b557ee At the hack-athon we decided to change the way that input filters
determine how much data is returned to the previous filter.  Prior to this
change, we used a field in the conn_rec to determine how much to return.
After this change, we use an argument to ap_get_brigade.  This makes it
much more obvious how things work at all levels, so that module authors
can easily determine how much data is supposed to be returned to them.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88912 13f79535-47bb-0310-9956-ffa450edef68
2001-04-22 22:19:32 +00:00
Ryan Bloom
97b23cb074 Add a comment about how http_filter works.
Submitted by:	Graham Leggett <minfrin@sharp.fm>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88911 13f79535-47bb-0310-9956-ffa450edef68
2001-04-22 15:46:19 +00:00
Roy T. Fielding
4647e5f71a Revert the change that moved keepalives out of conn_rec. That variable
controls the number of requests per connection, regardless of the protocol
used by the request.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88908 13f79535-47bb-0310-9956-ffa450edef68
2001-04-21 12:23:37 +00:00
Ryan Bloom
70a67b2c26 Move the keepalives field out of the conn_rec and into an HTTP specific
connection record.  This also moves some HTTP specific back out of the
core and into the HTTP module.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88881 13f79535-47bb-0310-9956-ffa450edef68
2001-04-18 03:53:34 +00:00
Ryan Bloom
a7bc1f3efa If a higher-level filter handles the the byterange aspects of a
request, then the byterange filter should not try to redo the
work.  The most common case of this happening, is a byterange
request going through the proxy, and the origin server handles
the byterange request.  The proxy should ignore it.

Submitted by:	Graham Leggett <minfrin@sharp.fm>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88873 13f79535-47bb-0310-9956-ffa450edef68
2001-04-16 21:16:53 +00:00
Ryan Bloom
3cba58c98f When I initially pulled the BYTERANGE filter into the core, Greg Stein
told me I was wrong.  I was wrong, and Greg was right.  This commit
just moves the byterange filter and its related functions out of the core,
and puts them back in the HTTP specific module.
Submitted by:	Greg Stein


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88815 13f79535-47bb-0310-9956-ffa450edef68
2001-04-11 23:37:16 +00:00
Greg Stein
11d8cc5a58 Fix the OPTIONS response. It was attempting to send an HTTP response
(header) through the filter stack, which just wrapped that response in
another set of headers.

Instead, just set the Allow header and return. The EOS will then flush that
header with the rest of the data through the header filter, and generate the
proper response.

Also, cleaned out the unused header_filter_ctx and the "len" variable from
the header filter, and added some comments here and there.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88600 13f79535-47bb-0310-9956-ffa450edef68
2001-03-28 10:40:44 +00:00