1POE::Filter::HTTPChunk(U3s)er Contributed Perl DocumentatPiOoEn::Filter::HTTPChunk(3)
2
3
4
5my $TEXT = qr/[^[:cntrl:]]/o; my $qdtext = qr/[^[:cntrl:]\"]/o; #<any TEXT
6except <">> my $quoted_pair = qr/\\[[:ascii:]]/o; my $quoted_string =
7qr/\"(?:$qdtext|$quoted_pair)\"/o; my $separators = "[^()<>@,;:\\"\/\[\]\?={}
8\t"; my $notoken = qr/(?:[[:cntrl:]$separators]/o;
9
10       my $chunk_ext_name = $token; my $chunk_ext_val =
11       qr/(?:$token|$quoted_string)/o;
12
13       my $chunk_extension = qr/(?:;$chunk_ext_name(?:$chunk_ext_val)?)/o;
14
15       sub put {
16         die "not implemented yet"; }
17

NAME

19       POE::Filter::HTTPChunk - Non-blocking incremental HTTP chunk parser.
20

VERSION

22       version 0.949
23

SYNOPSIS

25         # Not a complete program.
26         use POE::Filter::HTTPChunk;
27         use POE::Wheel::ReadWrite;
28         sub setup_io {
29           $_[HEAP]->{io_wheel} = POE::Wheel::ReadWrite->new(
30             Filter => POE::Filter::HTTPChunk->new(),
31             # See POE::Wheel::ReadWrite for other required parameters.
32           );
33         }
34

DESCRIPTION

36       This filter parses HTTP chunks from a data stream.  It's used by
37       POE::Component::Client::HTTP to do the bulk of the low-level HTTP
38       parsing.
39

CONSTRUCTOR

41   new
42       "new" takes no parameters and returns a shiny new
43       POE::Filter::HTTPChunk object ready to use.
44

METHODS

46       POE::Filter::HTTPChunk supports the following methods.  Most of them
47       adhere to the standard POE::Filter API.  The documentation for
48       POE::Filter explains the API in more detail.
49
50   get_one_start ARRAYREF
51       Accept an arrayref containing zero or more raw data chunks.  They are
52       added to the filter's input buffer.  The filter will attempt to parse
53       that data when get_one() is called.
54
55         $filter_httpchunk->get_one_start(\@stream_data);
56
57   get_one
58       Parse a single HTTP chunk from the filter's input buffer.  Data is
59       entered into the buffer by the get_one_start() method.  Returns an
60       arrayref containing zero or one parsed HTTP chunk.
61
62         $ret_arrayref = $filter_httpchunk->get_one();
63
64   get_pending
65       Returns an arrayref of stream data currently pending parsing.  It's
66       used to seamlessly transfer unparsed data between an old and a new
67       filter when a wheel's filter is changed.
68
69         $pending_arrayref = $filter_httpchunk->get_pending();
70

SEE ALSO

72       POE::Filter, POE.
73

BUGS

75       None are known at this time.
76

AUTHOR & COPYRIGHTS

78       POE::Filter::HTTPChunk is...
79
80       · Copyright 2005-2006 Martijn van Beers
81
82       · Copyright 2006 Rocco Caputo
83
84       All rights are reserved.  POE::Filter::HTTPChunk is free software; you
85       may redistribute it and/or modify it under the same terms as Perl
86       itself.
87

CONTACT

89       Rocco may be contacted by e-mail via <mailto:rcaputo@cpan.org>, and
90       Martijn may be contacted by email via <mailto:martijn@cpan.org>.
91
92       The preferred way to report bugs or requests is through RT though.  See
93       <http://rt.cpan.org/NoAuth/Bugs.html?Dist=POE-Component-Client-HTTP> or
94       mail <mailto:bug-POE-Component-Client-HTTP@rt.cpan.org>
95
96       For questions, try the POE mailing list (poe@perl.org)
97
98
99
100perl v5.32.0                      2020-07-28         POE::Filter::HTTPChunk(3)
Impressum