1
0
mirror of https://github.com/apache/httpd.git synced 2025-06-12 05:41:55 +03:00
Commit Graph

83 Commits

Author SHA1 Message Date
eeb57c17ad fix name of The Apache Software Foundation
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102619 13f79535-47bb-0310-9956-ffa450edef68
2004-02-09 20:40:53 +00:00
4f02cb1e18 apply Apache License, Version 2.0
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102525 13f79535-47bb-0310-9956-ffa450edef68
2004-02-06 22:58:42 +00:00
fb07607180 update license to 2004.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102135 13f79535-47bb-0310-9956-ffa450edef68
2004-01-01 13:26:26 +00:00
6c300dd034 The caller of ap_pass_brigade() relinquishes ownership of the brigade.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101895 13f79535-47bb-0310-9956-ffa450edef68
2003-11-26 02:12:49 +00:00
0959bde2cc clarify that filter_init_func is used only in the http protocol filters
PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101059 13f79535-47bb-0310-9956-ffa450edef68
2003-08-22 20:40:13 +00:00
637ae709b2 * util_filter.h (ap_filter_flush): clarify that this function has
nothing to do with FLUSH buckets. It is simply a cover function
    for ap_pass_brigade for use with the apr_brigade_* writing
    functions.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100646 13f79535-47bb-0310-9956-ffa450edef68
2003-07-16 06:24:07 +00:00
f033607768 Clarified comment on arg constraints for ap_get_brigade()
Submitted by:	Joe Schaefer <joe+gmane@sunstarsys.com>
Reviewed by:	Brian Pane


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100249 13f79535-47bb-0310-9956-ffa450edef68
2003-06-15 05:30:16 +00:00
742af25096 finished that boring job:
update license to 2003.

Happy New Year! ;-))


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98573 13f79535-47bb-0310-9956-ffa450edef68
2003-02-03 17:53:28 +00:00
f3fa0f0260 Update documentation to match prototype for ap_register_input_filter and
ap_register_output_filter.

Submitted by: Stas Bekman <stas@stason.org>,
              Joe Schaefer <joe+apache@sunstarsys.com>
Reviewed by: Justin Erenkrantz


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98244 13f79535-47bb-0310-9956-ffa450edef68
2003-01-12 20:44:37 +00:00
798c1dae43 Add a filter_init function to the filters so that a filter can execute
arbitrary code before the handlers are invoked.

This resolves an issue with incorrect 304s on If-Modified-Since mod_include
requests since ap_meets_conditions() is not aware that this is a dynamic
request and it is not possible to satisfy 304 for these requests (unless
xbithack full is on, of course).  When mod_include runs as a filter, it is
too late to set any flag since the handler is responsible for calling
ap_meets_conditions(), which it should do before generating any data.

If a module doesn't need to run such arbitrary code, it can just pass NULL
as the argument and all is well.

PR:	9673
Reviewed by:	Ryan Bloom and others


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95906 13f79535-47bb-0310-9956-ffa450edef68
2002-06-28 08:40:25 +00:00
f3792f4f86 Fix doxygen comments and add a missing line-feed.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95898 13f79535-47bb-0310-9956-ffa450edef68
2002-06-27 05:32:20 +00:00
8cf0d317fd Style cleanups before contemplating adding init filter hook.
(No functional changes)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95582 13f79535-47bb-0310-9956-ffa450edef68
2002-06-08 03:05:06 +00:00
845cbfd508 Update our copyright for this year.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93918 13f79535-47bb-0310-9956-ffa450edef68
2002-03-13 20:48:07 +00:00
b67fbc6004 Comments like this help keep the sanity of module authors.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93783 13f79535-47bb-0310-9956-ffa450edef68
2002-03-07 22:55:03 +00:00
3058b601ff As hinted on dev@httpd, change filter naming schemes to match our
expectations of their usage.

The reason that we should make this change now is that we have changed
the implied meaning of AP_FTYPE_HTTP_HEADER - some users of this should
be PROTOCOL while others should be CONTENT_SET.  In order to clarify it,
toss all of the bogus names and force the filter writers to make sure
they understand what they are doing.

CONTENT_SET is new (horrible name - change if you have better idea), but
it indicates that it should run between RESOURCE and PROTOCOL.
mod_deflate is the ideal CONTENT_SET filter.

The changed type names are:
CONTENT is now RESOURCE.
HTTP_HEADER is now PROTOCOL.  However, most filters that used HTTP_HEADER
may want CONTENT_SET.  (Only things like POP and HTTP belong as PROTOCOL.)

MMN bump since all filters need to be recompiled due to filter reordering.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93756 13f79535-47bb-0310-9956-ffa450edef68
2002-03-07 09:27:17 +00:00
116497445f Remove the prev pointer from the filter chain. This removes
the complexity of trying to set the filter chain correctly, with the
side-effect of forcing us to walk the entire chain whenever we add
a filter.  Since the filter chains are small, the decrease in
complexity is worth it.
Reviewed by:	Allan Edwards


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93745 13f79535-47bb-0310-9956-ffa450edef68
2002-03-07 02:09:30 +00:00
0d7f234515 This finishes the mod_dir/mod_negotiation bug. This final part of the
solution ensures that we don't lose filters if they are added later than
we expect.  The problem could be seen if a connection filter was added
after a request-based filter was added in the past.  The problem was that
the request-based filters pointed to the first filter in the connection
record, so the new connection filter was never called.  Now, all filters
are put on their correct filter lists, and we are sure to always update
all pointers when adding a filter.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93683 13f79535-47bb-0310-9956-ffa450edef68
2002-03-03 06:04:08 +00:00
3b5912070c document the ctx parameter to the add-input-filter functions
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93596 13f79535-47bb-0310-9956-ffa450edef68
2002-02-27 15:36:23 +00:00
2df244dfda Added ap_get_input_filter_handle() and ap_get_output_filter_handle()
Submitted by:	Ryan Morgan
Reviewed by:	Brian Pane


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93544 13f79535-47bb-0310-9956-ffa450edef68
2002-02-23 03:12:31 +00:00
08002aaebb Added new functions ap_add_input_filter_handle() and
ap_add_output_filter_handle()

There are many places in the core modules where we do
ap_add_input_filter() or ap_add_output_filter() on a
hardcoded filter name (e.g., "CORE" or "BYTERANGE").
This requires a string-to-filter mapping that wastes
CPU time.  (Even though the string lookup uses a trie
for speed, it still ranks as a big consumer of CPU time
because of the large number of filters added per request.)

The new ap_add_*_filter_handle() functions will allow
us to skip the string-to-filter mapping in cases where
the module adding the filter happens to have the
ap_filter_rec_t* for the registered filter (e.g., because
it's the same module that registered the filter in the
first place).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93039 13f79535-47bb-0310-9956-ffa450edef68
2002-01-27 01:54:54 +00:00
94d01b65aa Change ap_get_brigade prototype to remove *readbytes in favor of readbytes.
If you need the length, you should be using apr_brigade_length.  This is
much more consistent.  Of all the places that call ap_get_brigade, only
one (ap_http_filter) needs the length.  This makes it now possible to
pass constants down without assigning them to a temporary variable first.

Also:
- Change proxy_ftp to use EXHAUSTIVE mode (didn't catch its -1 before)
- Fix buglet in mod_ssl that would cause it to return too much data in
  some circumstances


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93014 13f79535-47bb-0310-9956-ffa450edef68
2002-01-25 01:11:47 +00:00
7d32242a14 Input filtering prototype change: Socket blocking type should be
separate from the input filter mode type.

We also no longer look at readbytes to determine the method of
filter operation.  This makes the use of filters more obvious and
allows a wider range of options for input filters modes.

To start with, the new input filter modes are:

AP_MODE_READBYTES (no more than *readbytes returned)
AP_MODE_GETLINE (old *readbytes == 0 case)
AP_MODE_EATCRLF (old AP_MODE_PEEK)
AP_MODE_SPECULATIVE (will be used in a future ap_getline rewrite)
AP_MODE_EXHAUSTIVE (old *readbytes == -1 case)
AP_MODE_INIT (special case for NNTP over SSL)

The block parameter is an apr_read_type_e: APR_BLOCK_READ, APR_NONBLOCK_READ

This also allows cleanup of mod_ssl's handling in the getline case.

Reviewed by:	Ryan Bloom (concept), Greg Stein (concept)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92928 13f79535-47bb-0310-9956-ffa450edef68
2002-01-19 07:45:18 +00:00
4b9c521468 add new input filter mode AP_MODE_INIT:
allows filters such as mod_ssl to initialize a client connection
(ie handshake) before reading request data from the client.
PR:
Obtained from:
Submitted by:   dougm
Reviewed by:	wrowe


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92042 13f79535-47bb-0310-9956-ffa450edef68
2001-11-19 22:36:20 +00:00
bcafbda69f Correct Verbage in comments.
Submitted by: Aarron Bannert <aaron@clove.org>
Reviewed by:	Ian Holsman <IanH@apache.org>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91354 13f79535-47bb-0310-9956-ffa450edef68
2001-10-08 16:44:04 +00:00
cac07fa8d9 A very small optimization to the OLD_WRITE logic. This just makes us store
a pointer to the OLD_WRITE frec, and instead of using strcmp or strcasecmp,
we can just do a simple pointer comparison.  This optimization is also
available to other modules.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91006 13f79535-47bb-0310-9956-ffa450edef68
2001-09-11 18:38:21 +00:00
bfe91354fb Allow mod_ssl to send back an error message if an HTTP request is sent
over an HTTPS connection.  This also adds an ap_remove_input_filter
function, which should be used to remove the SSL input filter in this
case, as soon as this code is stressed a bit more.

For right now, we are sending the same message that we used to send in
mod_ssl for Apache 1.3.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90724 13f79535-47bb-0310-9956-ffa450edef68
2001-08-27 06:00:51 +00:00
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
8f8d186a8d Document and future-proof the dependency between apr_read_type_e and
ap_input_mode_t.  It's now safe(r) to cast from ap_read_type_e to
ap_input_mode_t.

Submitted by:	Justin Erenkrantz, Sander Striker


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89671 13f79535-47bb-0310-9956-ffa450edef68
2001-07-24 00:10:26 +00:00
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
0c0d157331 Convert the filter and brigade writing functions to return status values,
not byte counts.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89305 13f79535-47bb-0310-9956-ffa450edef68
2001-06-08 11:00:14 +00:00
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
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
0765217fba Document the new argument to ap_get_brigade()
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88919 13f79535-47bb-0310-9956-ffa450edef68
2001-04-23 17:28:58 +00:00
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
358858ff36 The ap_f* functions should flush data to the filter that is passed in,
not to the filter after the one passed in.  The fixes a bug, where one
filter is skipped when using ap_f*.
Submitted by:	Ryan Morgan <rmorgan@covalent.net>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88832 13f79535-47bb-0310-9956-ffa450edef68
2001-04-12 20:06:50 +00:00
921c577c78 More doxygenation.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88531 13f79535-47bb-0310-9956-ffa450edef68
2001-03-17 15:58:09 +00:00
e552aeb0e3 Add a couple of GCC attribute tags to printf style functions. This also
fixes a couple of mismatched parameters highlighted revealed by the
attribute.
Submitted by:   Jon Travis <jtravis@covalent.net>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88271 13f79535-47bb-0310-9956-ffa450edef68
2001-02-22 04:05:58 +00:00
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
29a10959c0 First cut of TLS support.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88090 13f79535-47bb-0310-9956-ffa450edef68
2001-02-11 17:46:19 +00:00
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
a66d4ddfe2 "v" in the name has come to mean that a va_arg is in the parameter list.
putstrs is clearer in this case.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88041 13f79535-47bb-0310-9956-ffa450edef68
2001-02-09 22:57:50 +00:00
0c9ba2539b Fix another windows compile break.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88038 13f79535-47bb-0310-9956-ffa450edef68
2001-02-09 18:15:01 +00:00
d196c4648e A few small docs changes (there were ';' in the ScanDoc), and remove some
very cool but totally unportable macros.  :-(


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88034 13f79535-47bb-0310-9956-ffa450edef68
2001-02-09 14:47:48 +00:00
fef290bf18 *) namespace protect the filter_flush() function
*) don't toss the status value from ap_pass_brigade in ap_fflush; return it
*) doc/macro nits


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88031 13f79535-47bb-0310-9956-ffa450edef68
2001-02-09 11:15:03 +00:00
b98ee5e9ed Allow filters to buffer data in a brigade using the ap_f* functions.
These have become simple macros that just wrap the apr_brigade functions,
allowing filter writers to ignore the flush function and the ctx pointer.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88028 13f79535-47bb-0310-9956-ffa450edef68
2001-02-09 07:04:52 +00:00
4e0a0b215d Improved(?) docco.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87968 13f79535-47bb-0310-9956-ffa450edef68
2001-02-03 20:25:13 +00:00
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
7bfd9bc68c AP_REQUEST_DONE is bogus and a bad idea. This had the http_header filter
return -3 for every HEAD request, which in turn made us call ap_die.  Of
course, if we didn't have a 200 status (say we had a 206), then we would
seg fault, because we would end up sending down a second EOS bucket, which
would in turn make us call the byterange filter again, but at this point,
we hadn't cleaned up the byterange ctx structure, because it was never
supposed to be called again.

This was biting us on apache.org, where we had a HEAD request for
bytes=100- for a file.  This was a major seg fault.  We are better off
just returning OK is much safer.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87788 13f79535-47bb-0310-9956-ffa450edef68
2001-01-22 21:57:57 +00:00
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
4b9d80ed8c ap_save_brigade() can fail, so report what happened via an apr_status_t
return code.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87548 13f79535-47bb-0310-9956-ffa450edef68
2000-12-29 13:56:30 +00:00