line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTTP::StreamParser::Response; |
2
|
|
|
|
|
|
|
{ |
3
|
|
|
|
|
|
|
$HTTP::StreamParser::Response::VERSION = '0.101'; |
4
|
|
|
|
|
|
|
} |
5
|
1
|
|
|
1
|
|
550
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
26
|
|
6
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
20
|
|
7
|
1
|
|
|
1
|
|
660
|
use parent qw(HTTP::StreamParser); |
|
1
|
|
|
|
|
344
|
|
|
1
|
|
|
|
|
5
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 NAME |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
HTTP::StreamParser::Response - streaming parser for HTTP response data |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
=head1 VERSION |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
version 0.101 |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
=head1 SYNOPSIS |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=head1 DESCRIPTION |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=cut |
23
|
|
|
|
|
|
|
|
24
|
1
|
|
|
1
|
|
48
|
use List::Util qw(min); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
61
|
|
25
|
|
|
|
|
|
|
|
26
|
1
|
|
|
1
|
|
5
|
use constant BODY_CHUNK_SIZE => 4096; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
116
|
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head1 METHODS |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=cut |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=head2 state_sequence |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
Returns the sequence of states this response can be in, as a list. |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=cut |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub state_sequence { |
39
|
1
|
|
|
1
|
1
|
13
|
qw( |
40
|
|
|
|
|
|
|
http_version single_space http_code single_space http_status newline |
41
|
|
|
|
|
|
|
http_headers |
42
|
|
|
|
|
|
|
http_body |
43
|
|
|
|
|
|
|
) |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
1; |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
__END__ |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head1 AUTHOR |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
Tom Molesworth <cpan@entitymodel.com> |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head1 LICENSE |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
Copyright Tom Molesworth 2013. Licensed under the same terms as Perl itself. |