1HTTP::Proxy::BodyFilterU:s:ecromCpolnettrei(b3u)ted PerlHTDToPc:u:mPernotxayt:i:oBnodyFilter::complete(3)
2
3
4

NAME

6       HTTP::Proxy::BodyFilter::complete - A filter that passes on a complete
7       body or nothing
8

SYNOPSIS

10           use HTTP::Proxy;
11           use HTTP::Proxy::BodyFilter::simple;
12           use HTTP::Proxy::BodyFilter::complete;
13
14           my $proxy = HTTP::Proxy->new;
15
16           # pass the complete response body to our filter (in one pass)
17           $proxy->push_filter(
18               mime => 'text/html',
19               response => HTTP::Proxy::BodyFilter::complete->new,
20               response => HTTP::Proxy::BodyFilter::simple->new(
21                   sub {
22                       # some complex processing that needs
23                       # the whole response body
24                   }
25               );
26           );
27
28           $proxy->start;
29

DESCRIPTION

31       The HTTP::Proxy::BodyFilter::complete filter will ensure that the next
32       filter in the filter chain will only receive complete messages body
33       (either request or response).
34
35       It will store the chunks of data as they arrive, only to pass the
36       entire message body after the whole message has been received by the
37       proxy.
38
39       Subsequent filters is the chain will receive the whole body as a big
40       piece of data.
41

CAVEAT EMPTOR

43       This consumes memory and time.
44
45       Use with caution, otherwise your client will timeout, or your proxy
46       will run out of memory.
47

METHOD

49       This filter defines two methods, called automatically:
50
51       filter()
52           Stores the incoming data in memory until the last moment. The data
53           is then released to the subsequent filters in the chain.
54
55       will_modify()
56           This method returns a false value, thus indicating to the system
57           that it will not modify data passing through.
58

AUTHOR

60       Philippe "BooK" Bruhat, <book@cpan.org>.
61

THANKS

63       Thanks to Simon Cozens and Merijn H. Brandt, who needed this almost at
64       the same time. ";-)"
65
67       Copyright 2004-2006, Philippe Bruhat.
68

LICENSE

70       This module is free software; you can redistribute it or modify it
71       under the same terms as Perl itself.
72
73
74
75perl v5.8.8                       2006-09-0H4TTP::Proxy::BodyFilter::complete(3)
Impressum