1
0
mirror of https://github.com/apache/httpd.git synced 2026-01-26 19:01:35 +03:00
Commit Graph

580 Commits

Author SHA1 Message Date
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
Greg Ames
13a3c248cc Provide vhost and abbreviated request strings on ExtendedStatus displays.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89541 13f79535-47bb-0310-9956-ffa450edef68
2001-07-12 02:19:41 +00:00
Bill Stoddard
13793b8a50 Performance improvement to mod_mime.c. find_ct() in mod_mime,
spends a lot of time in apr_table_get calls.  Using the default
httpd.conf, the tables for languages and charsets are somewhat
large, so the time spent scanning them on each request is
significant. Replacing the tables with hash tables provides
a nice speedup. [Brian Pane <bpane@pacbell.net>]

Had to handmerge a lot of this patch so please review! Dean had some suggestions
for improvement which are not currently implemented.

Submitted by:	Brian Pane
Reviewed by:	Bill Stoddard


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89535 13f79535-47bb-0310-9956-ffa450edef68
2001-07-11 04:47:02 +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
Bill Stoddard
040c05592a Fix problem handling FLUSH bucket in the chunked encoding filter.
Module was calling ap_rwrite() followed by ap_rflush() but the
served content was not being displayed in the browser. Inspection
of the output stream revealed that the first data chunk was
missing the trailing CRLF required by the RFC


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89422 13f79535-47bb-0310-9956-ffa450edef68
2001-06-26 17:40:58 +00:00
William A. Rowe Jr
546f8d040c Allow index.html.en and Index.html.FR to both be considered in negotation
on case insensitive platforms, only.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89381 13f79535-47bb-0310-9956-ffa450edef68
2001-06-18 05:36:33 +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
0094a39006 don't add BYTERANGE, CONTENT_LENGTH, or HTTP_HEADER for
subrequests; they only make sense for main requests and
internal redirects


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89283 13f79535-47bb-0310-9956-ffa450edef68
2001-06-07 01:14:24 +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
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
Ken Coar
da47986440 Fix function type to match hook declaration.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89164 13f79535-47bb-0310-9956-ffa450edef68
2001-05-19 17:08:33 +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
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
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
Roy T. Fielding
779fc6bb31 Revert addition of HTTP logging hhok for connection status -- this is not
specific to HTTP.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88907 13f79535-47bb-0310-9956-ffa450edef68
2001-04-21 12:00:02 +00:00
Ryan Bloom
dadd829c60 Allow modules to specify their own logging format specifier. Basically,
mod_log_config has registered an optional function, that other modules
can use to specify a function to be called.  This is analogous to the way
that mod_include works.  This also allows http to do the connection
logging itself, without exposing HTTP specific pieces to other modules.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88888 13f79535-47bb-0310-9956-ffa450edef68
2001-04-18 21:06:07 +00:00
Ryan Bloom
ffe6ad2669 There is a bug in how we sort some hooks, the pre-config hook is one that
is definately incorrect.  Basically, the first time we call the pre-config
hooks, they are sorted correctly.  However, when we call them the second
time, we use the order that modules are loaded into the server.  This
move basically puts the http_module after mod_log_config in the compiled
server.  It is a hack, and a work-around to allow for my next commit.

When the hook sort issue is solved, this should be re-named to config.m4


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88887 13f79535-47bb-0310-9956-ffa450edef68
2001-04-18 20:56:04 +00:00
Jeff Trawick
52d4dfdfc0 add "extern" to the decl of http_module so that we don't get duplicate
symbol warnings from the linkers on some platforms (e.g., AIX)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88884 13f79535-47bb-0310-9956-ffa450edef68
2001-04-18 18:39:10 +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
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
Jeff Trawick
1545559270 make sure we have the prototype for strcasecmp()
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88593 13f79535-47bb-0310-9956-ffa450edef68
2001-03-27 11:47:23 +00:00
Ryan Bloom
e845552895 Move ap_set_last_modified to the core. This is a potentially
controversial change, because this is kind of HTTP specific.  However
many protocols should be able to take advantage of this kind of
information.  I expect that headers will need one more layer of
indirection for multi-protocol work, but this is a small step in
the right direction.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88580 13f79535-47bb-0310-9956-ffa450edef68
2001-03-25 20:42:47 +00:00
Jeff Trawick
9b13772f87 Handle ap_discard_request_body() being called more than once.
Add a debug assertion to verify that c->remain is zero when a new
request starts.  ap_http_filter() does the wrong thing otherwise.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88540 13f79535-47bb-0310-9956-ffa450edef68
2001-03-19 21:54:57 +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
15e12b0c7f Stops the forced downgrade of the connection to HTTP/1.0 for proxy requests.
Submitted by:	Graham Leggett
Reviewed by:	Chuck Murcko


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88528 13f79535-47bb-0310-9956-ffa450edef68
2001-03-16 07:37:12 +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
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
Jeff Trawick
072df7960c In ap_method_in_list(), fix a typo which inadvertently cleared
l->method_list.

PR:		6980


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88433 13f79535-47bb-0310-9956-ffa450edef68
2001-03-02 22:05:39 +00:00
William A. Rowe Jr
16231360f1 Goodbye ap_send_http_header
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88390 13f79535-47bb-0310-9956-ffa450edef68
2001-02-28 15:24:09 +00:00
Greg Stein
4be8260f87 core_pre_config isn't needed
Submitted by: Cliff Woolley


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88384 13f79535-47bb-0310-9956-ffa450edef68
2001-02-28 07:43:12 +00:00
Cliff Woolley
759657fd4c Remove references to apr_bucket_init_types() and
apr_bucket_insert_type().  I imagine that core_pre_config() could
go away completely, but I'll leave that to someone who knows
more about hooks than I do.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88381 13f79535-47bb-0310-9956-ffa450edef68
2001-02-28 04:48:44 +00:00
Cliff Woolley
fa49b7942b Update to reflect the absence of the apr_bucket_shared
struct and the newly-added start field of the apr_bucket struct


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88372 13f79535-47bb-0310-9956-ffa450edef68
2001-02-27 21:02:15 +00:00
Greg Ames
e7bc0e338f finally figured out why that word looked funny - can't spell
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88362 13f79535-47bb-0310-9956-ffa450edef68
2001-02-26 22:43:15 +00:00
Greg Ames
baf1e03541 insure that canned error msgs are translated to ascii before leaving
an ebcdic server in worst case scenarios.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88361 13f79535-47bb-0310-9956-ffa450edef68
2001-02-26 22:07:00 +00:00