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

SYNOPSIS

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

DESCRIPTION

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

CONSTRUCTOR

38   new
39       "new" takes no parameters and returns a shiny new
40       POE::Filter::HTTPChunk object ready to use.
41

METHODS

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

SEE ALSO

69       POE::Filter, POE.
70

BUGS

72       None are known at this time.
73

AUTHOR & COPYRIGHTS

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

CONTACT

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