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 filter
10       stacks.
11
12       From the point of view of HTTP::Proxy::FilterStack, a filter is
13       actually a ("matchsub", "filterobj") pair. The match subroutine
14       (generated by HTTP::Proxy's "push_filter()" method) is run against the
15       current HTTP::Message object to find out which filters must be kept in
16       the 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 is
32           used (with the help of each filter's match subroutine) to select
33           the subset of filters that will be applied on the given message.
34
35       filter( @args )
36           This method calls all the currently selected filters in turn, with
37           the appropriate arguments.
38
39       filter_last()
40           This method calls all the currently selected filters in turn, to
41           filter the data remaining in the buffers in a single pass.
42
43       will_modify()
44           Return a boolean value indicating if the list of selected filters
45           in the stack will modify the body content. The value is computed
46           from the result of calling "will_modify()" on all selected filters.
47
48       all()
49           Return a list of all filters in the stack.
50
51       eod()
52           Used for END OF DATA bookkeeping.
53
54       push()
55           Push the given "[ match, filterobj ]" pairs at the top of the
56           stack.
57
58       insert( $idx, @pairs )
59           Insert the given "[ match, filterobj ]" pairs at position $idx in
60           the stack.
61
62       remove( $idx )
63           Remove the "[ match, filterobj ]" pair at position $idx in the
64           stack.
65

AUTHOR

67       Philippe "BooK" Bruhat, <book@cpan.org>.
68
70       Copyright 2002-2015, Philippe Bruhat.
71

LICENSE

73       This module is free software; you can redistribute it or modify it
74       under the same terms as Perl itself.
75
76
77
78perl v5.32.0                      2020-07-28       HTTP::Proxy::FilterStack(3)
Impressum