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

258 Commits

Author SHA1 Message Date
William A. Rowe Jr
bdaf32fa88 Downgrade must occur before we attempt to TRACE, e.g., for clients with
broken chunking.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90658 13f79535-47bb-0310-9956-ffa450edef68
2001-08-25 17:48:52 +00:00
William A. Rowe Jr
13cff90a55 Two cases we are certain of canonical correctness
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90586 13f79535-47bb-0310-9956-ffa450edef68
2001-08-23 21:05:42 +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
ff7a816bf5 Remove the ->mtime reset back to negotiation, who decided to do this.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89949 13f79535-47bb-0310-9956-ffa450edef68
2001-08-06 19:13:02 +00:00
William A. Rowe Jr
5835764fc8 _THIS_ is why mod_dir wouldn't serve the results of mod_negotiation
with a query string


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89948 13f79535-47bb-0310-9956-ffa450edef68
2001-08-06 19:10:12 +00:00
William A. Rowe Jr
68eb2c2c83 The real slim shady finally stood up. This patch segregates the fast
internal redirect logic back into http_request, the next patch will
  actually fix it.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89946 13f79535-47bb-0310-9956-ffa450edef68
2001-08-06 19:03:37 +00:00
Graham Leggett
222ffd4bea Add a check to ap_die() to make sure the filter stack is sane and
contains the correct basic filters when an error occurs. This fixes
a problem where headers are not being sent on error.
PR:
Obtained from:
Submitted by:	John Sterling
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89253 13f79535-47bb-0310-9956-ffa450edef68
2001-06-01 17:35:07 +00:00
Graham Leggett
1fe44dacde Move the addition of default AP_HTTP_HTTP_HEADER filters to the
insert_filter phase so that other filters are not bypassed by default.
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89252 13f79535-47bb-0310-9956-ffa450edef68
2001-06-01 17:26:19 +00:00
Doug MacEachern
654a74cbae back out filter change that is preventing headers to be sent
PR:
Obtained from:
Submitted by: john sterling
Reviewed by:	dougm


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89239 13f79535-47bb-0310-9956-ffa450edef68
2001-05-30 05:18:33 +00:00
Graham Leggett
3fdc9ca62a Move the addition of default AP_HTTP_HTTP_HEADER filters to the insert_filter
phase so that other filters are not bypassed by default.
PR:
Obtained from:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89196 13f79535-47bb-0310-9956-ffa450edef68
2001-05-21 23:47:21 +00:00
Jeff Trawick
ea5640f142 fix the type of a parameter to ap_get_brigade()
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89045 13f79535-47bb-0310-9956-ffa450edef68
2001-05-07 10:01:31 +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
Bill Stoddard
4732553655 Performance: Add quick_handler hook. This hook is called at the
very beginning of the request processing before location_walk,
translate_name, etc.  This hook is useful for URI keyed content
caches like Mike Abbott's Quick Shortcut Cache.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88596 13f79535-47bb-0310-9956-ffa450edef68
2001-03-27 19:19:08 +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
Chuck Murcko
93463cfc17 This is a fix that went into v1.3 quite a while back, but not into v2.0.
It sorts out the problem when a password protected reverse proxy URL
sends a Proxy-Authenticate to a browser instead of a WWW-Authenticate.

This patch covers the changes to the httpd-2.0 tree.

Submitted by:	Graham Leggett
Reviewed by:	Chuck Murcko


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88527 13f79535-47bb-0310-9956-ffa450edef68
2001-03-16 07:28:08 +00:00
Ryan Bloom
54ed3070d5 Another chunk of code from http to core. This should continue to build
on all platforms.  The next job is to shuffle functions back and forth
so that the server builds without mod_http.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88453 13f79535-47bb-0310-9956-ffa450edef68
2001-03-05 04:43:56 +00:00
Cliff Woolley
93fe62dd77 Simplify by using apr_bucket_delete(e) where possible.
(Oh, plus one tiny little loop simplification.)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88337 13f79535-47bb-0310-9956-ffa450edef68
2001-02-25 23:08:52 +00:00
Greg Stein
dd9b08e321 *) Introduce "ap_conf_vector_t" type to assist with legibility and provide
some type safety. (unfortunately, our old "void*" is type-safe with the
   new one, but over time we should be better)

*) Propagate the new type to all appropriate functions.

*) Random cleaning, whitespace, stylistic nits.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88225 13f79535-47bb-0310-9956-ffa450edef68
2001-02-18 02:58:53 +00:00
Roy T. Fielding
381f88d56a Update copyright to 2001
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88184 13f79535-47bb-0310-9956-ffa450edef68
2001-02-16 04:26:53 +00:00
Greg Stein
bb282b75f7 Clean up some of the includes:
- explicitly include apr_lib.h since ap_config.h doesn't
- use apr_want.h where possible
- use APR_HAVE_ where possible
- remove some unneeded includes


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88060 13f79535-47bb-0310-9956-ffa450edef68
2001-02-10 13:05:29 +00:00
Doug MacEachern
88d3406f9a renaming various functions for consistency sake
see: http://apr.apache.org/~dougm/apr_rename.pl
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88019 13f79535-47bb-0310-9956-ffa450edef68
2001-02-08 07:45:33 +00:00
William A. Rowe Jr
d038b40a6f Fix the remaining APR_FINFO_NORM occurances. Again, followup is needed
to actually test any field outside the scope of APR_FINFO_MIN.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87935 13f79535-47bb-0310-9956-ffa450edef68
2001-01-31 23:11:05 +00:00
Bill Stoddard
2b16dac8e1 This fixes a performance problem with directory indexing on Windows.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87934 13f79535-47bb-0310-9956-ffa450edef68
2001-01-31 22:58:53 +00:00
William A. Rowe Jr
6282d6e364 Eliminate all assumptions that finfo.protection reflects the existance
or absense of a file.  finfo.filetype is defined as 0 if APR_NOFILE,
  or a non-zero value if the file could be apr_stat()'ed.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87933 13f79535-47bb-0310-9956-ffa450edef68
2001-01-31 22:45:35 +00:00
Bill Stoddard
2ff91fd0b4 apr_stat() in http_request.c only needs size, type, mtime, ctime & atime values from
the file. Modify apr_stat() under windows to accomodate apr_stat( APR_FINFO_MIN)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87931 13f79535-47bb-0310-9956-ffa450edef68
2001-01-31 20:01:16 +00:00
William A. Rowe Jr
38a237ecbb Back out a bit of yesterday's patch, since the explicit return
handles this correctly.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87889 13f79535-47bb-0310-9956-ffa450edef68
2001-01-28 14:00:56 +00:00
William A. Rowe Jr
7f4a5fe7f5 Use the appropriate APR_FINFO_flags for the apr_stat/lstat/getfileinfo
calls to avoid ownership and permissions on Win32 when they are not
  required, and until they are implemented.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87873 13f79535-47bb-0310-9956-ffa450edef68
2001-01-27 21:28:28 +00:00
Ryan Bloom
e4265b4294 Cleanup the error bucket code a bit. This uses the error bucket directly
instead of using ap_bucket_read.  It also lets ap_die handle the fact that
the filter returned the error.
Submitted by:	Greg Stein


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87867 13f79535-47bb-0310-9956-ffa450edef68
2001-01-27 17:17:51 +00:00
Ryan Bloom
fd0256ed99 filters can now report an HTTP error to the server. This is done
by sending a brigade where the first bucket is an error_bucket.
This bucket is a simple bucket that stores an HTTP error and
a string.  Currently the string is not used, but it may be needed
to output an error log.  The http_header_filter will find this
bucket, and output the error text, and then return
AP_FILTER_ERROR, which informs the server that the error web page
has already been sent.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87863 13f79535-47bb-0310-9956-ffa450edef68
2001-01-27 07:13:39 +00:00
Greg Stein
c8d300bd44 Begin mod_core.h for CORE-private information. Ideally, AP_CORE_DECLARE
function decl's and CORE_PRIVATE header info should all move into this
header.

Start with moving the filter function declarations.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87808 13f79535-47bb-0310-9956-ffa450edef68
2001-01-24 02:14:23 +00:00
William A. Rowe Jr
cd1ef027c2 The changes required for the APR_FINFO_wanted argument to
apr_stat/lstat/getfileinfo.  These are -NOT- optimal, they
  are simply the required changes to get the server working.
  The size of the patch is a warning about how we need to
  really look at what we are trying to accomplish with all
  of these stat/lstat calls.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87760 13f79535-47bb-0310-9956-ffa450edef68
2001-01-20 21:42:23 +00:00
Ryan Bloom
8eedea62af Stop checking to see if this is a pipelined request if we know
for a fact that it isn't.  Basically, if r->connection->keepalive == 0.
This keeps us from making an extra read call when serving a 1.0
request.
Submitted by:	  Ryan Bloom and Greg Stein


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87738 13f79535-47bb-0310-9956-ffa450edef68
2001-01-19 17:19:51 +00:00
William A. Rowe Jr
59bbd68bec The big change. This is part 3 of the apr-util symbols rename, please
see the first commit of srclib/apr-util/include (cvs apr-util/include)
  for the quick glance at symbols changed.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87731 13f79535-47bb-0310-9956-ffa450edef68
2001-01-19 07:04:36 +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
0955906aea Get Multi-Views working again. It wasn't working because we weren't
setting the path_info field correctly if we didn't find the specified
file.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87004 13f79535-47bb-0310-9956-ffa450edef68
2000-11-18 05:44:53 +00:00
William A. Rowe Jr
5ef1c8aa2d A good thing, allow W2K to perform the symlink test.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86918 13f79535-47bb-0310-9956-ffa450edef68
2000-11-11 01:20:03 +00:00
William A. Rowe Jr
cf28fad4b1 Killing ap_os_is_filename_valid. Left actual win32 code, since it is
moving into apr and the check_safe_file call.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86906 13f79535-47bb-0310-9956-ffa450edef68
2000-11-10 15:29:07 +00:00
Greg Stein
820d6de59c byterange handling simply did not work for internal redirects.
(e.g. fetch /foo/ which redirects to /foo/index.html)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86883 13f79535-47bb-0310-9956-ffa450edef68
2000-11-09 10:45:01 +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
049e020782 Always send the EOS on the correct request. Basically, we call
ap_finalize_request_protocol on the main request, then we find the
last internally re-directed request, and send the EOS on that request.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86735 13f79535-47bb-0310-9956-ffa450edef68
2000-10-24 16:57:53 +00:00
Ryan Bloom
776482abf4 Fix internal redirects. They should have their own HTTP_HEADER filter
instance, and we need to remove the main-request's HTTP_HEADER.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86707 13f79535-47bb-0310-9956-ffa450edef68
2000-10-23 10:31:44 +00:00
Ryan Bloom
92451206d5 Sub-requests have to have a value for their request_config structure,
or we'll seg-fault.  This should set the sub-request's request_config
structure to the same exact same structure as the main request is using.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86655 13f79535-47bb-0310-9956-ffa450edef68
2000-10-18 22:14:18 +00:00
Jeff Trawick
2441a2aa49 Set the request config in the new r, not the old r.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86654 13f79535-47bb-0310-9956-ffa450edef68
2000-10-18 21:22:14 +00:00
Ryan Bloom
1af6430ebf We have to create the core_request_config structure in the core on internal
redirects.  If this isn't done, we'll seg-fault during the AP_DEBUG_ASSERT
that makes sure getline didn't leave any droppings.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86650 13f79535-47bb-0310-9956-ffa450edef68
2000-10-18 18:50:11 +00:00
William A. Rowe Jr
4743e5fa7a Fix a broken thing
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86645 13f79535-47bb-0310-9956-ffa450edef68
2000-10-18 17:38:30 +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
c06c057a8d Get rid of some old code related to the way that character set translation
of protocol data and bodies was performed in the past.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86612 13f79535-47bb-0310-9956-ffa450edef68
2000-10-16 18:00:49 +00:00