1HTTP::Proxy::FilterStacUks(e3r)Contributed Perl DocumentHaTtTiPo:n:Proxy::FilterStack(3)
2
3
4

NAME

6       HTTP::Proxy::FilterStack - A class to manage filter stacks
7

DESCRIPTION

9       This class is used internally by "HTTP::Proxy" to manage its four fil‐
10       ter stacks.
11
12       From the point of view of "HTTP::Proxy::FilterStack", a filter is actu‐
13       ally a ("matchsub", "filterobj") pair. The match subroutine (generated
14       by "HTTP::Proxy"'s "push_filter()" method) is run against the current
15       "HTTP::Message" object to find out which filters must be kept in the
16       stack when handling this message.
17
18       The filter stack maintains a set of buffers where the filters can store
19       data. This data is appended at the beginning of the next chunk of data,
20       until all the data has been sent.
21

METHODS

23       The class provides the following methods:
24
25       new( $isbody )
26           Create a new instance of "HTTP::Proxy::FilterStack". If $isbody is
27           true, then the stack will manage body filters (subclasses of
28           "HTTP::Proxy::BodyFilter").
29
30       select_filters( $message )
31           $message is the current "HTTP::Message" handled by the proxy.  It
32           is used (with the help of each filter's match subroutine)
33
34       filter( @args )
35           This method calls all the currently selected filters in turn, with
36           the appropriate arguments.
37
38       filter_last()
39           This method calls all the currently selected filters in turn, to
40           filter the data remaining in the buffers in a single pass.
41
42       will_modify()
43           Return a boolean value indicating if the list of selected filters
44           in the stack will modify the body content. The value is computed
45           from the result of calling "will_modify()" on all selected filters.
46
47       all()
48           Return a list of all filters in the stack.
49
50       eod()
51           Used for END OF DATA bookkeeping.
52
53       push()
54           Push the given "[ match, filterobj ]" pairs at the top of the
55           stack.
56
57       insert( $idx, @pairs )
58           Insert the given "[ match, filterobj ]" pairs at position $idx in
59           the stack.
60
61       remove( $idx )
62           Remove the "[ match, filterobj ]" pair at position $idx in the
63           stack.
64

AUTHOR

66       Philippe "BooK" Bruhat, <book@cpan.org>.
67
69       Copyright 2002-2006, Philippe Bruhat.
70

LICENSE

72       This module is free software; you can redistribute it or modify it
73       under the same terms as Perl itself.
74
75
76
77perl v5.8.8                       2006-09-04       HTTP::Proxy::FilterStack(3)
Impressum