/[Apache-SVN]/httpd/httpd/trunk/include/util_filter.h
ViewVC logotype

Log of /httpd/httpd/trunk/include/util_filter.h

Parent Directory Parent Directory | Revision Log Revision Log


Links to HEAD: (view) (annotate)
Sticky Revision:

Revision 830527 - (view) (annotate) - [select for diffs]
Modified Wed Oct 28 13:25:49 2009 UTC (4 weeks, 1 day ago) by poirier
File length: 24393 byte(s)
Diff to previous 822870 (colored)
Fix a lot of doxygen warnings.  Thanks to Brad Hards for the patch.
I added a few more fixes, and there are still more that might
need a doxygen expert.

PR: 48061
Submitted by: Brad Hards
Reviewed by: poirier

Revision 822870 - (view) (annotate) - [select for diffs]
Modified Wed Oct 7 19:35:09 2009 UTC (7 weeks, 1 day ago) by sf
File length: 24345 byte(s)
Diff to previous 726060 (colored)
Update comments in util_filter.h about bucket and brigade ownership to reflect
current practice and the advice from manual/developer/output-filters.xml.

Submitted by: Rici Lake <rici ricilake.net>
Reviewed by: Stefan Fritsch, Joe Orton

Revision 726060 - (view) (annotate) - [select for diffs]
Modified Fri Dec 12 15:57:39 2008 UTC (11 months, 2 weeks ago) by jorton
File length: 23837 byte(s)
Diff to previous 721677 (colored)
* include/util_filter.h (ap_fputstrs): Mark with sentinel attribute
  for gcc >= 4.

Revision 721677 - (view) (annotate) - [select for diffs]
Modified Sat Nov 29 12:57:42 2008 UTC (11 months, 4 weeks ago) by covener
File length: 23760 byte(s)
Diff to previous 600473 (colored)
Prevent AP_FILTER_ERROR from being misinterpreted as SUSPENDED when checking
the status code returned by a handler by updating the values of the filter
error macros and consolidating them in httpd.h 


Revision 600473 - (view) (annotate) - [select for diffs]
Modified Mon Dec 3 10:55:58 2007 UTC (23 months, 3 weeks ago) by jorton
File length: 24093 byte(s)
Diff to previous 420983 (colored)
Further to r599711; document new API guarantee for handling non-NULL
request_rec pointer when adding connection filters; minor MMN bump:

* server/util_filter.c (add_any_filter_handle): Set f->r for
  connection filters even if passed-in r is non-NULL.  Style nit fix
  also.

* include/util_filter.h (ap_add_output_filter,
  ap_add_output_filter_handle): Document new API guarantee.

* include/ap_mmn.h: Minor MMN bump.

Revision 420983 - (view) (annotate) - [select for diffs]
Modified Tue Jul 11 20:33:53 2006 UTC (3 years, 4 months ago) by fielding
File length: 23512 byte(s)
Diff to previous 412721 (colored)
update license header text

Revision 412721 - (view) (annotate) - [select for diffs]
Modified Thu Jun 8 10:56:22 2006 UTC (3 years, 5 months ago) by niq
File length: 23365 byte(s)
Diff to previous 395228 (colored)
Fix comment

Revision 395228 - (view) (annotate) - [select for diffs]
Modified Wed Apr 19 12:11:27 2006 UTC (3 years, 7 months ago) by colm
File length: 23362 byte(s)
Diff to previous 315041 (colored)
Update the copyright year in all .c, .h and .xml files

Revision 315041 - (view) (annotate) - [select for diffs]
Modified Wed Oct 12 20:43:25 2005 UTC (4 years, 1 month ago) by niq
File length: 23362 byte(s)
Diff to previous 315024 (colored)
Make ap_register_output_filter back into a function (*sigh*)
but update its API doc

Revision 315024 - (view) (annotate) - [select for diffs]
Modified Wed Oct 12 20:18:33 2005 UTC (4 years, 1 month ago) by niq
File length: 23734 byte(s)
Diff to previous 263931 (colored)
Make ap_register_output_filter a #define

Revision 263931 - (view) (annotate) - [select for diffs]
Modified Sun Aug 28 23:03:59 2005 UTC (4 years, 3 months ago) by ianh
File length: 24084 byte(s)
Diff to previous 151408 (colored)
Doxygen fixup / cleanup

submited by: Neale Ranns neale ranns.org
reviewed by: Ian Holsman


Revision 151408 - (view) (annotate) - [select for diffs]
Modified Fri Feb 4 20:28:49 2005 UTC (4 years, 9 months ago) by jerenkrantz
File length: 24019 byte(s)
Diff to previous 106103 (colored)
Update copyright year to 2005 and standardize on current copyright owner line.

Revision 106103 - (view) (annotate) - [select for diffs]
Modified Sun Nov 21 18:50:36 2004 UTC (5 years ago) by nd
File length: 23983 byte(s)
Diff to previous 105646 (colored)
general property cleanup

Revision 105646 - (view) (annotate) - [select for diffs]
Modified Sun Oct 31 18:00:43 2004 UTC (5 years ago) by niq
File length: 23983 byte(s)
Diff to previous 105613 (colored)
Change FilterDeclare/FilterProvider semantics as discussed in
http://marc.theaimsgroup.com/?l=apache-httpd-dev&m=109899588616670&w=2

Revision 105613 - (view) (annotate) - [select for diffs]
Modified Thu Oct 28 13:21:08 2004 UTC (5 years, 1 month ago) by niq
File length: 24242 byte(s)
Diff to previous 105603 (colored)
Fixup broken handling of range header.

Revision 105603 - (view) (annotate) - [select for diffs]
Modified Wed Oct 27 09:20:33 2004 UTC (5 years, 1 month ago) by niq
File length: 24321 byte(s)
Diff to previous 105507 (colored)
Move ap_filter_provider_t back out of public API
(suggested by nd; makes sense to niq)

Revision 105507 - (view) (annotate) - [select for diffs]
Modified Sun Oct 17 18:31:44 2004 UTC (5 years, 1 month ago) by nd
File length: 25264 byte(s)
Diff to previous 105501 (colored)
allow <= and >= for filter dispatcher

Revision 105501 - (view) (annotate) - [select for diffs]
Modified Sun Oct 17 15:44:21 2004 UTC (5 years, 1 month ago) by nd
File length: 25232 byte(s)
Diff to previous 105500 (colored)
use more speaking names

Revision 105500 - (view) (annotate) - [select for diffs]
Modified Sun Oct 17 15:18:56 2004 UTC (5 years, 1 month ago) by nd
File length: 25207 byte(s)
Diff to previous 105499 (colored)
more style

Revision 105499 - (view) (annotate) - [select for diffs]
Modified Sun Oct 17 14:25:04 2004 UTC (5 years, 1 month ago) by nd
File length: 25207 byte(s)
Diff to previous 105226 (colored)
save spaces! Soon in future we're going to run out of spaces!!!

Revision 105226 - (view) (annotate) - [select for diffs]
Modified Tue Sep 21 10:14:40 2004 UTC (5 years, 2 months ago) by niq
File length: 25198 byte(s)
Diff to previous 105089 (colored)
Merge mod_filter with util_filter structs; add API for protocol stuff.
Rename FilterDebug directive to FilterTrace.

Revision 105089 - (view) (annotate) - [select for diffs]
Modified Sun Sep 12 15:50:43 2004 UTC (5 years, 2 months ago) by niq
File length: 21001 byte(s)
Diff to previous 102619 (colored)
PR: 19688
Fix incorrect (and important) comments

Revision 102619 - (view) (annotate) - [select for diffs]
Modified Mon Feb 9 20:40:53 2004 UTC (5 years, 9 months ago) by nd
File length: 20991 byte(s)
Diff to previous 102525 (colored)
fix name of The Apache Software Foundation

Revision 102525 - (view) (annotate) - [select for diffs]
Modified Fri Feb 6 22:58:42 2004 UTC (5 years, 9 months ago) by nd
File length: 20987 byte(s)
Diff to previous 102135 (colored)
apply Apache License, Version 2.0

Revision 102135 - (view) (annotate) - [select for diffs]
Modified Thu Jan 1 13:26:26 2004 UTC (5 years, 10 months ago) by nd
File length: 23013 byte(s)
Diff to previous 101895 (colored)
update license to 2004.

Revision 101895 - (view) (annotate) - [select for diffs]
Modified Wed Nov 26 02:12:49 2003 UTC (6 years ago) by trawick
File length: 23013 byte(s)
Diff to previous 101059 (colored)
The caller of ap_pass_brigade() relinquishes ownership of the brigade.

Revision 101059 - (view) (annotate) - [select for diffs]
Modified Fri Aug 22 20:40:13 2003 UTC (6 years, 3 months ago) by stas
File length: 22960 byte(s)
Diff to previous 100646 (colored)
clarify that filter_init_func is used only in the http protocol filters
PR:
Obtained from:
Submitted by:
Reviewed by:

Revision 100646 - (view) (annotate) - [select for diffs]
Modified Wed Jul 16 06:24:07 2003 UTC (6 years, 4 months ago) by gstein
File length: 22771 byte(s)
Diff to previous 100249 (colored)
* 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.

Revision 100249 - (view) (annotate) - [select for diffs]
Modified Sun Jun 15 05:30:16 2003 UTC (6 years, 5 months ago) by brianp
File length: 22629 byte(s)
Diff to previous 98573 (colored)
Clarified comment on arg constraints for ap_get_brigade()
Submitted by:	Joe Schaefer <joe+gmane@sunstarsys.com>
Reviewed by:	Brian Pane

Revision 98573 - (view) (annotate) - [select for diffs]
Modified Mon Feb 3 17:53:28 2003 UTC (6 years, 9 months ago) by nd
File length: 22547 byte(s)
Diff to previous 98244 (colored)
finished that boring job:
update license to 2003.

Happy New Year! ;-))

Revision 98244 - (view) (annotate) - [select for diffs]
Modified Sun Jan 12 20:44:37 2003 UTC (6 years, 10 months ago) by jerenkrantz
File length: 22547 byte(s)
Diff to previous 95906 (colored)
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

Revision 95906 - (view) (annotate) - [select for diffs]
Modified Fri Jun 28 08:40:25 2002 UTC (7 years, 5 months ago) by jerenkrantz
File length: 22332 byte(s)
Diff to previous 95898 (colored)
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

Revision 95898 - (view) (annotate) - [select for diffs]
Modified Thu Jun 27 05:32:20 2002 UTC (7 years, 5 months ago) by jerenkrantz
File length: 21627 byte(s)
Diff to previous 95582 (colored)
Fix doxygen comments and add a missing line-feed.

Revision 95582 - (view) (annotate) - [select for diffs]
Modified Sat Jun 8 03:05:06 2002 UTC (7 years, 5 months ago) by jerenkrantz
File length: 21618 byte(s)
Diff to previous 93918 (colored)
Style cleanups before contemplating adding init filter hook.
(No functional changes)

Revision 93918 - (view) (annotate) - [select for diffs]
Modified Wed Mar 13 20:48:07 2002 UTC (7 years, 8 months ago) by fielding
File length: 21087 byte(s)
Diff to previous 93783 (colored)
Update our copyright for this year.

Revision 93783 - (view) (annotate) - [select for diffs]
Modified Thu Mar 7 22:55:03 2002 UTC (7 years, 8 months ago) by aaron
File length: 21087 byte(s)
Diff to previous 93756 (colored)
Comments like this help keep the sanity of module authors.

Revision 93756 - (view) (annotate) - [select for diffs]
Modified Thu Mar 7 09:27:17 2002 UTC (7 years, 8 months ago) by jerenkrantz
File length: 21016 byte(s)
Diff to previous 93745 (colored)
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.

Revision 93745 - (view) (annotate) - [select for diffs]
Modified Thu Mar 7 02:09:30 2002 UTC (7 years, 8 months ago) by rbb
File length: 20833 byte(s)
Diff to previous 93683 (colored)
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

Revision 93683 - (view) (annotate) - [select for diffs]
Modified Sun Mar 3 06:04:08 2002 UTC (7 years, 8 months ago) by rbb
File length: 20901 byte(s)
Diff to previous 93596 (colored)
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.

Revision 93596 - (view) (annotate) - [select for diffs]
Modified Wed Feb 27 15:36:23 2002 UTC (7 years, 9 months ago) by trawick
File length: 20833 byte(s)
Diff to previous 93544 (colored)
document the ctx parameter to the add-input-filter functions

Revision 93544 - (view) (annotate) - [select for diffs]
Modified Sat Feb 23 03:12:31 2002 UTC (7 years, 9 months ago) by brianp
File length: 20729 byte(s)
Diff to previous 93039 (colored)
Added ap_get_input_filter_handle() and ap_get_output_filter_handle()
Submitted by:	Ryan Morgan
Reviewed by:	Brian Pane

Revision 93039 - (view) (annotate) - [select for diffs]
Modified Sun Jan 27 01:54:54 2002 UTC (7 years, 10 months ago) by brianp
File length: 20328 byte(s)
Diff to previous 93014 (colored)
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).

Revision 93014 - (view) (annotate) - [select for diffs]
Modified Fri Jan 25 01:11:47 2002 UTC (7 years, 10 months ago) by jerenkrantz
File length: 19098 byte(s)
Diff to previous 92928 (colored)
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

Revision 92928 - (view) (annotate) - [select for diffs]
Modified Sat Jan 19 07:45:18 2002 UTC (7 years, 10 months ago) by jerenkrantz
File length: 19101 byte(s)
Diff to previous 92042 (colored)
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)

Revision 92042 - (view) (annotate) - [select for diffs]
Modified Mon Nov 19 22:36:20 2001 UTC (8 years ago) by dougm
File length: 18851 byte(s)
Diff to previous 91354 (colored)
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

Revision 91354 - (view) (annotate) - [select for diffs]
Modified Mon Oct 8 16:44:04 2001 UTC (8 years, 1 month ago) by ianh
File length: 18715 byte(s)
Diff to previous 91006 (colored)
Correct Verbage in comments.

Submitted by: Aarron Bannert <aaron@clove.org>
Reviewed by:	Ian Holsman <IanH@apache.org>

Revision 91006 - (view) (annotate) - [select for diffs]
Modified Tue Sep 11 18:38:21 2001 UTC (8 years, 2 months ago) by rbb
File length: 18726 byte(s)
Diff to previous 90724 (colored)
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.

Revision 90724 - (view) (annotate) - [select for diffs]
Modified Mon Aug 27 06:00:51 2001 UTC (8 years, 3 months ago) by rbb
File length: 18700 byte(s)
Diff to previous 89987 (colored)
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.

Revision 89987 - (view) (annotate) - [select for diffs]
Modified Tue Aug 7 16:19:03 2001 UTC (8 years, 3 months ago) by rbb
File length: 18504 byte(s)
Diff to previous 89671 (colored)
Remove all warnings from the input filtering stack.

Revision 89671 - (view) (annotate) - [select for diffs]
Modified Tue Jul 24 00:10:26 2001 UTC (8 years, 4 months ago) by jwoolley
File length: 18506 byte(s)
Diff to previous 89362 (colored)
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

Revision 89362 - (view) (annotate) - [select for diffs]
Modified Wed Jun 13 13:44:40 2001 UTC (8 years, 5 months ago) by rbb
File length: 18401 byte(s)
Diff to previous 89305 (colored)
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.

Revision 89305 - (view) (annotate) - [select for diffs]
Modified Fri Jun 8 11:00:14 2001 UTC (8 years, 5 months ago) by gstein
File length: 18311 byte(s)
Diff to previous 89041 (colored)
Convert the filter and brigade writing functions to return status values,
not byte counts.

Revision 89041 - (view) (annotate) - [select for diffs]
Modified Sun May 6 23:27:14 2001 UTC (8 years, 6 months ago) by rbb
File length: 18076 byte(s)
Diff to previous 89008 (colored)
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.

Revision 89008 - (view) (annotate) - [select for diffs]
Modified Sat May 5 11:18:01 2001 UTC (8 years, 6 months ago) by gstein
File length: 18074 byte(s)
Diff to previous 88919 (colored)
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.

Revision 88919 - (view) (annotate) - [select for diffs]
Modified Mon Apr 23 17:28:58 2001 UTC (8 years, 7 months ago) by rbb
File length: 18076 byte(s)
Diff to previous 88912 (colored)
Document the new argument to ap_get_brigade()

Revision 88912 - (view) (annotate) - [select for diffs]
Modified Sun Apr 22 22:19:32 2001 UTC (8 years, 7 months ago) by rbb
File length: 17947 byte(s)
Diff to previous 88832 (colored)
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.

Revision 88832 - (view) (annotate) - [select for diffs]
Modified Thu Apr 12 20:06:50 2001 UTC (8 years, 7 months ago) by rbb
File length: 17900 byte(s)
Diff to previous 88531 (colored)
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>

Revision 88531 - (view) (annotate) - [select for diffs]
Modified Sat Mar 17 15:58:09 2001 UTC (8 years, 8 months ago) by ben
File length: 17924 byte(s)
Diff to previous 88271 (colored)
More doxygenation.

Revision 88271 - (view) (annotate) - [select for diffs]
Modified Thu Feb 22 04:05:58 2001 UTC (8 years, 9 months ago) by rbb
File length: 18921 byte(s)
Diff to previous 88184 (colored)
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>

Revision 88184 - (view) (annotate) - [select for diffs]
Modified Fri Feb 16 04:26:53 2001 UTC (8 years, 9 months ago) by fielding
File length: 18841 byte(s)
Diff to previous 88090 (colored)
Update copyright to 2001

Revision 88090 - (view) (annotate) - [select for diffs]
Modified Sun Feb 11 17:46:19 2001 UTC (8 years, 9 months ago) by ben
File length: 18836 byte(s)
Diff to previous 88060 (colored)
First cut of TLS support.

Revision 88060 - (view) (annotate) - [select for diffs]
Modified Sat Feb 10 13:05:29 2001 UTC (8 years, 9 months ago) by gstein
File length: 18971 byte(s)
Diff to previous 88041 (colored)
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

Revision 88041 - (view) (annotate) - [select for diffs]
Modified Fri Feb 9 22:57:50 2001 UTC (8 years, 9 months ago) by gstein
File length: 18973 byte(s)
Diff to previous 88038 (colored)
"v" in the name has come to mean that a va_arg is in the parameter list.
putstrs is clearer in this case.

Revision 88038 - (view) (annotate) - [select for diffs]
Modified Fri Feb 9 18:15:01 2001 UTC (8 years, 9 months ago) by stoddard
File length: 18969 byte(s)
Diff to previous 88034 (colored)
Fix another windows compile break.

Revision 88034 - (view) (annotate) - [select for diffs]
Modified Fri Feb 9 14:47:48 2001 UTC (8 years, 9 months ago) by rbb
File length: 18962 byte(s)
Diff to previous 88031 (colored)
A few small docs changes (there were ';' in the ScanDoc), and remove some
very cool but totally unportable macros.  :-(

Revision 88031 - (view) (annotate) - [select for diffs]
Modified Fri Feb 9 11:15:03 2001 UTC (8 years, 9 months ago) by gstein
File length: 18992 byte(s)
Diff to previous 88028 (colored)
*) namespace protect the filter_flush() function
*) don't toss the status value from ap_pass_brigade in ap_fflush; return it
*) doc/macro nits

Revision 88028 - (view) (annotate) - [select for diffs]
Modified Fri Feb 9 07:04:52 2001 UTC (8 years, 9 months ago) by rbb
File length: 18910 byte(s)
Diff to previous 87968 (colored)
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.

Revision 87968 - (view) (annotate) - [select for diffs]
Modified Sat Feb 3 20:25:13 2001 UTC (8 years, 9 months ago) by ben
File length: 16399 byte(s)
Diff to previous 87863 (colored)
Improved(?) docco.

Revision 87863 - (view) (annotate) - [select for diffs]
Modified Sat Jan 27 07:13:39 2001 UTC (8 years, 10 months ago) by rbb
File length: 17007 byte(s)
Diff to previous 87788 (colored)
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.

Revision 87788 - (view) (annotate) - [select for diffs]
Modified Mon Jan 22 21:57:57 2001 UTC (8 years, 10 months ago) by rbb
File length: 16972 byte(s)
Diff to previous 87731 (colored)
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.

Revision 87731 - (view) (annotate) - [select for diffs]
Modified Fri Jan 19 07:04:36 2001 UTC (8 years, 10 months ago) by wrowe
File length: 17007 byte(s)
Diff to previous 87548 (colored)
  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.

Revision 87548 - (view) (annotate) - [select for diffs]
Modified Fri Dec 29 13:56:30 2000 UTC (8 years, 11 months ago) by trawick
File length: 16996 byte(s)
Diff to previous 86955 (colored)
ap_save_brigade() can fail, so report what happened via an apr_status_t
return code.

Revision 86955 - (view) (annotate) - [select for diffs]
Modified Tue Nov 14 06:11:24 2000 UTC (9 years ago) by rbb
File length: 16979 byte(s)
Diff to previous 86746 (colored)
Stop the default_handler from trying to deal with HEAD requests.  By doing
this, the content-length filter can determine the C-L before we send the
response, and we get a better response.

Revision 86746 - (view) (annotate) - [select for diffs]
Modified Wed Oct 25 15:03:52 2000 UTC (9 years, 1 month ago) by trawick
File length: 16944 byte(s)
Diff to previous 86741 (colored)
Fix a typo in a comment.
Submitted by:	Chris Pepper <pepper@mail.reppep.com>
Reviewed by:	Jeff Trawick

Revision 86741 - (view) (annotate) - [select for diffs]
Modified Wed Oct 25 10:39:04 2000 UTC (9 years, 1 month ago) by trawick
File length: 16943 byte(s)
Diff to previous 86739 (colored)
Provide a bit of doc for the hackish^H^H^H^H^H^H^Hwonderful filter
types I introduced yesterday.

Revision 86739 - (view) (annotate) - [select for diffs]
Modified Wed Oct 25 00:38:04 2000 UTC (9 years, 1 month ago) by trawick
File length: 16458 byte(s)
Diff to previous 86690 (colored)
Introduce more filter types.  This gets chunking of output working
again by ensuring that the chunk filter gets added after the http
headers filter.

Revision 86690 - (view) (annotate) - [select for diffs]
Modified Sat Oct 21 17:22:28 2000 UTC (9 years, 1 month ago) by rbb
File length: 16350 byte(s)
Diff to previous 86684 (colored)
Add a way to remove output filters.  This is used by http_header_filter to
remove itself once it has actually sent the headers.

Revision 86684 - (view) (annotate) - [select for diffs]
Modified Sat Oct 21 13:20:36 2000 UTC (9 years, 1 month ago) by trawick
File length: 16291 byte(s)
Diff to previous 86609 (colored)
Input filters and ap_get_brigade() now have a input mode parameter
(blocking, non-blocking, peek) instead of a length parameter.

Revision 86609 - (view) (annotate) - [select for diffs]
Modified Mon Oct 16 06:05:15 2000 UTC (9 years, 1 month ago) by wrowe
File length: 16341 byte(s)
Diff to previous 86572 (colored)
  Renamed all MODULE_EXPORT symbols to AP_MODULE_DECLARE and all symbols
  for CORE_EXPORT to AP_CORE_DECLARE (namespace protecting the wrapper)
  and retitled API_EXPORT as AP_DECLARE and APR_EXPORT as APR_DECLARE.
  All _VAR_ flavors changes to _DATA to be absolutely clear.
  Thank you Greg, for the most obvious suggestion.

Revision 86572 - (view) (annotate) - [select for diffs]
Modified Fri Oct 13 00:02:06 2000 UTC (9 years, 1 month ago) by rbb
File length: 16341 byte(s)
Diff to previous 86567 (colored)
Fix a typo from earlier today.  The filters accept apr_ssize_t's, so the
get_brigade code should also use apr_ssize_t.
Submitted by:	Greg Stein

Revision 86567 - (view) (annotate) - [select for diffs]
Modified Thu Oct 12 16:35:39 2000 UTC (9 years, 1 month ago) by rbb
File length: 16325 byte(s)
Diff to previous 86478 (colored)
Implement a length argument on input filters.  There are three possible
values for the length, -1, 0, and a positive number.  -1 means that the
next filter should return all the data it has, the current filter will
take care to ensure that the protocol is followed.  Most filters will
never use this, because it implies they are implementing a conn_based
input filter.  0 means give me exactly one line of data.  A positive
number means give me a maximum of n bytes.

Revision 86478 - (view) (annotate) - [select for diffs]
Modified Mon Oct 9 17:39:10 2000 UTC (9 years, 1 month ago) by trawick
File length: 15188 byte(s)
Diff to previous 86403 (colored)
Remove stray semicolon from AP_NOBODY_READ and AP_NOBODY_WROTE decls.
Remove some out-of-date ap_pass_brigade() doc.
Tweak the ap_get_brigade() doc a little.

Revision 86403 - (view) (annotate) - [select for diffs]
Modified Thu Oct 5 16:55:10 2000 UTC (9 years, 1 month ago) by trawick
File length: 15821 byte(s)
Diff to previous 86401 (colored)
Add a bit of infrastructure which will be needed for input filtering:

1) separate filter lists hanging off the r and the c

   requests start off with the same filter list as the connection

   the input filter list is not initialized for subrequests

   internal redirects start off with the same filter list as the
   connection

2) AddInputFilter directive (blatant rip-off of Ryan's AddOutputFilter
   directive); as with AddOutputFilter, the network is implicitly to the
   right of the specified filter list; this may not be the most
   intuitive way to specify the filters; not sure yet

Revision 86401 - (view) (annotate) - [select for diffs]
Modified Thu Oct 5 12:01:48 2000 UTC (9 years, 1 month ago) by trawick
File length: 15694 byte(s)
Diff to previous 86392 (colored)
Now that we have ap_add_input_filter(), rename ap_add_filter() to
ap_add_output_filter().

Revision 86392 - (view) (annotate) - [select for diffs]
Modified Wed Oct 4 23:19:33 2000 UTC (9 years, 1 month ago) by rbb
File length: 15488 byte(s)
Diff to previous 86370 (colored)
Connection oriented filters are now stored in the conn_rec instead of the
request_rec.  This means that a conn_rec must be supplied when calling
ap_add_filter.  The reason for this change is that we need to be able to
add the core_filter (whether or SSL or not) before we try to read the
request.  This way, if a request fails, we can actually send the error
page back to the client.  With this change, we add the core filter to the
conn_rec during the pre-connection phase.
Submitted by:	Ryan Bloom, Jeff Trawick, and Greg Ames

Revision 86370 - (view) (annotate) - [select for diffs]
Modified Tue Oct 3 00:44:00 2000 UTC (9 years, 1 month ago) by rbb
File length: 15444 byte(s)
Diff to previous 86359 (colored)
Replace ap_get_data_from_filter and ap_save_data_to_filter with
ap_save_brigade.  This function does not try to save the actual brigade to
a specific location.  If just traverses the brigade, calls setaside if
it is available and concatenates it with a previously setaside brigade.

The resulting brigade is returned to the caller for them to save it to
the appropriate location.

Revision 86359 - (view) (annotate) - [select for diffs]
Modified Mon Oct 2 00:47:28 2000 UTC (9 years, 1 month ago) by rbb
File length: 15870 byte(s)
Diff to previous 86255 (colored)
Implement input filtering.  This is definately not completely correct, but
it is a good first step.  It is possible to add filters when reading from
the client with this change.

Revision 86255 - (view) (annotate) - [select for diffs]
Modified Tue Sep 19 23:28:55 2000 UTC (9 years, 2 months ago) by trawick
File length: 14728 byte(s)
Diff to previous 86251 (colored)
Fix filter registration so that the appropriate list of
registrations is actually modified.  This allows Apache to server
pages again.  (Before this, every ap_add_filter() silently failed
and so output content went to the bit bucket.)

Also, repair some comments and un-namespace-protect a now-static
function.

Revision 86251 - (view) (annotate) - [select for diffs]
Modified Tue Sep 19 20:56:09 2000 UTC (9 years, 2 months ago) by rbb
File length: 14343 byte(s)
Diff to previous 86224 (colored)
tart getting things setup for input filtering.  All this basically does
is add part of the infrastructure.  Namely:

1) filter list in the conn_rec, which is where the input filter list
   must live

2) Split the register_filter into multiple functions, one to register
   input filters the other to register output filters.

3) Modify existing modules so they still work.

Revision 86224 - (view) (annotate) - [select for diffs]
Modified Thu Sep 14 05:08:42 2000 UTC (9 years, 2 months ago) by dougm
File length: 13660 byte(s)
Diff to previous 86221 (colored)
put ctx back in ap_add_filter()

Revision 86221 - (view) (annotate) - [select for diffs]
Modified Thu Sep 14 00:34:15 2000 UTC (9 years, 2 months ago) by rbb
File length: 13649 byte(s)
Diff to previous 86220 (colored)
Add a pointer to the filter_rec_t from the filter_t.  This allows modules
to get to the filter name from the filter itself.  This is useful for
modules like mod_perl, which have one filter function that does different
things based on the name used when the filter was inserted.

Revision 86220 - (view) (annotate) - [select for diffs]
Modified Wed Sep 13 23:13:20 2000 UTC (9 years, 2 months ago) by rbb
File length: 13130 byte(s)
Diff to previous 86162 (colored)
Add the AddFilter directive.  This directive takes a list of filter names
that have been previously registered with the server.  Currently the
directive is only valid inside the config file, but once the Options
directive is tweaked a bit, I would feel more comfortable exposing this
directive to htaccess files.

As a part of making adding this filter, I removed the ctx pointer from the
ap_add_filter prototype.  The problem is that the core is the thing that
is actually inserting the filter into the filter stack, but the core doesn't
know how to allocate memory for each filter.  The solution is to have the
filters themselves be responsible for allocating the ctx memory whenever
it is required.

Revision 86162 - (view) (annotate) - [select for diffs]
Modified Wed Aug 30 01:09:09 2000 UTC (9 years, 2 months ago) by gstein
File length: 13220 byte(s)
Diff to previous 86161 (colored)
reversing the latest commit; it was vetoed a while back.

Revision 86161 - (view) (annotate) - [select for diffs]
Modified Tue Aug 29 22:16:45 2000 UTC (9 years, 3 months ago) by rbb
File length: 13635 byte(s)
Diff to previous 86160 (colored)
Modify the way filters are added to the server.  Instead of using a FIFO,
we use a modified LIFO.  It is modified, because if we add a filter while
in the middle of another filter, the added filter gets put in after the
current filter.  This requires that the server is smart about which filters
are added when.  This should be handled by the HTTP protocol, but we will
want to keep and eye on things for a little while.

This change is necessary, because currently when we add a filter it goes
after the last filter of the same type.  This is broken whenever we want
to add a filter that has a dependancy.  Think about the core and chunking
filters.  They are of the same type, and core is always added first.  When
we go to insert chunking, it gets added, but it is never called.

Revision 86160 - (view) (annotate) - [select for diffs]
Modified Tue Aug 29 20:57:29 2000 UTC (9 years, 3 months ago) by trawick
File length: 13220 byte(s)
Diff to previous 86091 (colored)
Filters (and thus ap_pass_brigade()) now return an apr_status_t as their
return value.

Revision 86091 - (view) (annotate) - [select for diffs]
Modified Thu Aug 17 01:10:07 2000 UTC (9 years, 3 months ago) by gstein
File length: 13174 byte(s)
Diff to previous 86089 (colored)
this shouldn't have gone in yet. there is still pending discussion.

Revision 86089 - (view) (annotate) - [select for diffs]
Modified Thu Aug 17 00:50:34 2000 UTC (9 years, 3 months ago) by rbb
File length: 13173 byte(s)
Diff to previous 86076 (colored)
Make ap_add_filter use a LIFO stack instead of a FIFO queue to add filters
to the filter stack.  This makes the chunking filter work.  Without this,
the core_filter is installed in the insert_filters hook, when we get
to the ap_send_http_headers function, we insert the chunking filter, but
it has been installed after the core_filter.  This means the chunk_filter
is never called.

This reverses this.  The core_filter is installed in the insert_filters
hook, and we put the chunk_filter in during ap_send_http_headers.  This
time, the chunking filter is installed before the core_filter, and it
gets called correctly.

Revision 86076 - (view) (annotate) - [select for diffs]
Modified Tue Aug 15 02:14:29 2000 UTC (9 years, 3 months ago) by gstein
File length: 13174 byte(s)
Diff to previous 86075 (colored)
a filter's context is to be used however the filter likes. it is a void*,
    not necessarily a bucket brigade.

Revision 86075 - (view) (annotate) - [select for diffs]
Modified Tue Aug 15 01:50:17 2000 UTC (9 years, 3 months ago) by trawick
File length: 13185 byte(s)
Diff to previous 86062 (colored)
Fix some typos in the comments.

Revision 86062 - (view) (annotate) - [select for diffs]
Modified Sat Aug 12 23:59:13 2000 UTC (9 years, 3 months ago) by rbb
File length: 13121 byte(s)
Diff to previous 86061 (colored)
Add an error condition to the filter code.  Basically, if somehow we get
to the very bottom of the filter stack and nobody has written anything to
the network, then we need to return an error.

Revision 86061 - (view) (annotate) - [select for diffs]
Modified Sat Aug 12 23:52:44 2000 UTC (9 years, 3 months ago) by rbb
File length: 13084 byte(s)
Diff to previous 86059 (colored)
document util_filter.h using Scandoc

Revision 86059 - (view) (annotate) - [select for diffs]
Modified Sat Aug 12 18:45:35 2000 UTC (9 years, 3 months ago) by rbb
File length: 9969 byte(s)
Diff to previous 85994 (colored)
Initial Filtering code.  This uses a bucket brigade scheme to allow modules
to add and modify data while processing a request.  The docs still need
to be updated, and a simple html page needs to be created explaining all
of this.

The only filter currently in the code is the core filter.  This filter
takes a bucket brigade and writes it to the network through the buff
structure.  In time, the buff will go away completely.

More filters will need to be written.
Submitted by:	The Apache Community
Reviewed by:	The Apache Community

Revision 85994 - (view) (annotate) - [select for diffs]
Modified Sat Aug 5 04:38:58 2000 UTC (9 years, 3 months ago) by rbb
File length: 8788 byte(s)
Diff to previous 85976 (colored)
Fix a small name mix-up.  Filters are part of Apache, and should have the
ap_ prefix, not apr_

Revision 85976 - (view) (annotate) - [select for diffs]
Modified Wed Aug 2 05:27:38 2000 UTC (9 years, 3 months ago) by dougm
File length: 8799 byte(s)
Diff to previous 85926 (colored)
prefix libapr functions and types with apr_

Revision 85926 - (view) (annotate) - [select for diffs]
Added Fri Jul 28 20:31:02 2000 UTC (9 years, 4 months ago) by rbb
File length: 8787 byte(s)
Add the ability to register filters.  This commit introduces a warning
into the build.  This warning will be removed automatically, as soon as
we decide on a prototype for the function causing the warning.  That
decision is tied to which filtering mechanism we decide on.
Submitted by:	Ryan Bloom and Greg Stein

This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, enter a numeric revision.

  Diffs between and
  Type of Diff should be a

apache@apache.org
ViewVC Help
Powered by ViewVC 1.1.2