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

285 Commits

Author SHA1 Message Date
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
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
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
203ca097b9 This patch fixes more untold breakage than you can shake a stick at.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89863 13f79535-47bb-0310-9956-ffa450edef68
2001-08-01 19:15:22 +00:00
William A. Rowe Jr
0eee59792b Provide the same optimization to the dir_config structure to track
d_is_absolute, along with d_is_fnmatch.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89791 13f79535-47bb-0310-9956-ffa450edef68
2001-07-30 18:51:57 +00:00
William A. Rowe Jr
10f9a8910c More obsessive changes to meet HTML 3.2, HTML 4.01 Transitional and
XHTML 1.0 Transitional


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89750 13f79535-47bb-0310-9956-ffa450edef68
2001-07-28 00:46:49 +00:00
William A. Rowe Jr
ed317a04fc Cliff's most sane advise :-)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89719 13f79535-47bb-0310-9956-ffa450edef68
2001-07-25 22:38:21 +00:00
William A. Rowe Jr
c9148bcd49 This same patch is needed in mod_asis and others, I'm testing the waters
for this solution.  I'm easily convinced to choose AP_MAX_SENDFILE based
  on any reasonable argument, provided it's smaller than 2^30 :-)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89714 13f79535-47bb-0310-9956-ffa450edef68
2001-07-25 21:41:44 +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
Ryan Bloom
3d8f3ce64b Make scoreboard creation a hook. This allows management
modules to have access to the scoreboard at the time that it is
created, and at every restart request.
Submitted by:	Cody Sherr <csherr@covalent.net>
Reviewed by:	Ryan Bloom


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89608 13f79535-47bb-0310-9956-ffa450edef68
2001-07-18 20:45:36 +00:00
Bill Stoddard
aedbb34ee7 Add error message and return if we fail reading from a bucket in the
core_outout_filter(). core_output_filter() is in need of a rewrite, it is
getting quite crufty.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89507 13f79535-47bb-0310-9956-ffa450edef68
2001-07-06 18:41:56 +00:00
Bill Stoddard
3ab4db196a emulate_sendfile() is a better name for what this function does. No function
change is made by this patch, only a static function name change.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89506 13f79535-47bb-0310-9956-ffa450edef68
2001-07-06 18:07:24 +00:00
Cliff Woolley
29212e8c6b *) Account for the new pool parameter to apr_bucket_file_create()
and apr_bucket_file_make().

*) Simplify mod_file_cache's sendfile_handler by taking advantage
   the new ability of file buckets to handle files opened in XTHREAD
   mode.  [Also inlined some of the brigade construction stuff in
   mod_file_cache's handlers to save a palloc() or two.]


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89438 13f79535-47bb-0310-9956-ffa450edef68
2001-06-27 20:18:09 +00:00
Jeff Trawick
03a0359eb8 As with Apache 1.3, use priority APLOG_INFO (instead of APLOG_ERR) for
log messages which report network errors writing to the client.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89384 13f79535-47bb-0310-9956-ffa450edef68
2001-06-18 12:38:17 +00:00
Ryan Bloom
afaf899642 Back out the change to allocate files out of the main request pool, and
implement pool-based setaside for FILE and MMAP buckets.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89370 13f79535-47bb-0310-9956-ffa450edef68
2001-06-14 22:56:12 +00:00
Greg Stein
e5640cedcc Define a hook for fetching management/status items.
This patch was submitted by Ian Holsman. Greg revised some names, applied
the Apache style, and namespace-prefixed the public symbols. Minor bugfix in
the use of the hook implementation macro.

Submitted by: Ian Holsman <IanH@cnet.com>
Reviewed by: Greg Stein


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89364 13f79535-47bb-0310-9956-ffa450edef68
2001-06-13 20:11:45 +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
Greg Ames
4419b1ab32 Fix seg faults and/or missing output from mod_include. The
default_handler was using the subrequest pool for files and
MMAPs, even though the associated APR structures typically
live longer than the subrequest.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89354 13f79535-47bb-0310-9956-ffa450edef68
2001-06-12 19:03:08 +00:00
Ryan Bloom
0f8c1f462c We need to increment i during this for loop. Without this change, we will
end up in an infinite loop.
Submitted by:	Ryan Morgan


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89309 13f79535-47bb-0310-9956-ffa450edef68
2001-06-08 16:39:48 +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
Bill Stoddard
91a89a9056 Set the conn_rec->aborted flag when we detect a whacked connection on the
write path.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88978 13f79535-47bb-0310-9956-ffa450edef68
2001-05-02 20:15:56 +00:00
Ryan Bloom
d807de8879 Fix the logic for saving data onto the heap before sending it. Basically,
we have to use nbytes+flen when figuring out how much data we have,
and when looking at the fact that we have a buffer to save aside before
sending it, we also need to look at the length, to ensure that we aren't
saving too much.
Submitted by:	Bill Stoddard and Ryan Bloom


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88972 13f79535-47bb-0310-9956-ffa450edef68
2001-05-01 21:59:26 +00:00
Ryan Bloom
d25aa600d2 AP_MIN_BYTES_TO_WRITE currently equals APR_BUCKET_BUFF_SIZE, so we
have to use <=


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88970 13f79535-47bb-0310-9956-ffa450edef68
2001-05-01 19:40:14 +00:00
Greg Stein
10ead4521a Add a comment about an assumption we make in our keepalive buffering.
Delay the check for "too many items in an iovec" until we actually try to
put something in there. This allows that N+1 bucket to be an EOS, FLUSH,
FILE, or zero-length bucket without triggering a split. Only if that next
bucket has iovec data will a split be made.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88969 13f79535-47bb-0310-9956-ffa450edef68
2001-05-01 18:43:09 +00:00
Ryan Bloom
fa2595bb24 Create Files, and thus MMAPs, out of the request pool, not the
connection pool.  This solves a small resource leak that had us
not closing files until a connection was closed.  In order to do
this, at the end of the core_output_filter, we loop through the
brigade and convert any data we have into a single HEAP bucket
that we know will survive clearing the request_rec.

Submitted by:	Ryan Bloom, Justin Erenkrantz <jerenkrantz@ebuilt.com>,
                Cliff Woolley


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88964 13f79535-47bb-0310-9956-ffa450edef68
2001-04-29 17:05:49 +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
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
David Reid
3b2e5e5022 Move the error logging of a failed send into the core output filter. This
should catch errors in any way we send data.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88726 13f79535-47bb-0310-9956-ffa450edef68
2001-04-04 21:41:52 +00:00
David Reid
043396b7d0 This adds some simple error logging to send_the_file. There are a
lot more cases that we should log :(


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88700 13f79535-47bb-0310-9956-ffa450edef68
2001-04-03 19:32:19 +00:00
Doug MacEachern
44238d2266 change create_request hook to RUN_ALL/return int so handlers can throw errors
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88576 13f79535-47bb-0310-9956-ffa450edef68
2001-03-25 17:38:18 +00:00
Jeff Trawick
aa563a6faf Fix a major security problem with double-reverse lookup checking.
Previously, a client connecting over IPv4 would not be matched
properly when the server had an IPv6 listening socket.

PR:	      7407
Submitted by: Taketo Kabe <kiabe@sra-tohoku.co.jp>
Reviewed by:  Jeff Trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88561 13f79535-47bb-0310-9956-ffa450edef68
2001-03-22 10:03:29 +00:00
Ryan Bloom
895b7b26ac Add a hook, create_request. This hook allows modules to modify
a request while it is being created.  This hook is called for all
request_rec's, main request, sub request, and internal redirect.
When this hook is called, the the r->main, r->prev, r->next
pointers have been set, so modules can determine what kind of
request this is.

Currently, this is only used by the core module, but protocol modules
are going to need to have the ability to affect the request while it is
being read.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88532 13f79535-47bb-0310-9956-ffa450edef68
2001-03-18 02:33:23 +00:00
Jeff Trawick
d3dcba691d tweak ap_get_remote_host() so that the caller can find out if she got
back an IP address

mod_access needed to know this, but the old code didn't handle IPv6


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88484 13f79535-47bb-0310-9956-ffa450edef68
2001-03-09 20:30:34 +00:00
Ryan Bloom
3eeeb76fb4 Move more code from the http module into the core server. This
is core code, basically the default handler, the default input
and output filters, and all of the core configuration directives.
All of this code is required in order for the server to work, with or
without HTTP.  The server is closer to working without the HTTP
module, although there is still more to do.

I tried to fix Windows, but somebody should probably make sure I did
it correctly.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88449 13f79535-47bb-0310-9956-ffa450edef68
2001-03-04 06:27:27 +00:00