line |
true |
false |
branch |
24
|
4 |
12 |
if defined $read_timeout and $read_timeout <= 0 |
28
|
2 |
14 |
$head_as_array ? : |
35
|
1 |
29 |
if _select($rin, undef, undef, $read_timeout) != 1 or defined $read_timeout and $read_timeout <= 0 |
39
|
2 |
9 |
if $no_content_len and $decapitated and !defined($nbytes) || $nbytes == 0 |
41
|
0 |
27 |
unless (defined $nbytes) |
42
|
0 |
0 |
if $! == 11 or $! == 11 or $! == 4 |
44
|
0 |
0 |
$decapitated ? : |
52
|
5 |
22 |
if ($nbytes == 0) |
54
|
0 |
5 |
$decapitated ? : |
60
|
9 |
13 |
if ($decapitated) { } |
62
|
0 |
9 |
unless ($no_content_len) |
69
|
10 |
3 |
if ($neck_pos > 0) |
75
|
0 |
10 |
if $status_code == 204 |
87
|
3 |
54 |
if ($key_lc eq 'transfer-encoding' and $value eq 'chunked') { } |
|
4 |
50 |
elsif ($key_lc eq 'content-length' or lc $key eq 'content-length') { } |
|
4 |
46 |
elsif ($key_lc eq 'connection' and $value eq 'close') { } |
|
2 |
88 |
elsif ($key_lc eq 'trailer' and $value) { } |
97
|
13 |
44 |
if ($head_as_array) { } |
110
|
2 |
8 |
if ($doing_chunked and $trailer_value_is_true) |
114
|
3 |
7 |
if ($doing_chunked) |
115
|
0 |
3 |
unless $parse_chunked |
125
|
1 |
1 |
$header->{'Trailer'} ? : |
|
1 |
2 |
$head_as_array ? : |
130
|
4 |
3 |
if (defined $content_length) { } |
131
|
0 |
4 |
if ($content_length == 0) { } |
155
|
0 |
23 |
if (length $buf < 3 or length $buf < $chunk_size or $wait_for_last_clrf > 0) |
156
|
0 |
0 |
if _select($rin, undef, undef, $read_timeout) != 1 or defined $read_timeout and $read_timeout <= 0 |
160
|
0 |
0 |
unless (defined $nbytes) |
161
|
0 |
0 |
if $! == 11 or $! == 11 or $! == 4 |
171
|
0 |
0 |
if ($nbytes == 0) |
182
|
0 |
23 |
if ($wait_for_last_clrf > 0) |
184
|
0 |
0 |
if $wait_for_last_clrf <= 0 |
187
|
2 |
21 |
if ($trailer_mode) { } |
207
|
2 |
0 |
if ($neck_pos > 0) |
211
|
9 |
12 |
if ($chunk_size > 0 and length $buf >= $chunk_size) { } |
217
|
12 |
0 |
if ($neck_pos > 0) { } |
|
0 |
0 |
elsif ($neck_pos == 0) { } |
219
|
3 |
9 |
if ($chunk_size == 0) { } |
220
|
2 |
1 |
if ($true_trailer_header) { } |
226
|
0 |
1 |
if (length $buf < 2) { } |
256
|
0 |
5 |
unless defined $inet_aton |
262
|
0 |
5 |
unless socket $soc, 2, 1, $tcp_proto |
263
|
0 |
5 |
unless my $flags = fcntl($soc, 3, 0) |
264
|
0 |
5 |
unless fcntl $soc, 4, $flags | 2048 |
266
|
0 |
5 |
if (not connect($soc, $addr) and $! != 115) |
270
|
0 |
5 |
if defined $connect_timeout and $connect_timeout <= 0 |
272
|
0 |
5 |
if (_select(undef, $rout, undef, $connect_timeout) != 1) |
273
|
0 |
0 |
if (defined $connect_timeout) { } |
288
|
1 |
4 |
if ($! = unpack('L', getsockopt($soc, 1, 4))) |
297
|
8 |
32 |
defined $args->{'query_string'} ? : |
311
|
8 |
32 |
$args->{'no_default_host_header'} ? : |
|
8 |
32 |
defined $args->{'body'} ? : |
|
10 |
30 |
$args->{'head'} && @{$args->{'head'};} ? : |
|
8 |
32 |
defined $args->{'body'} ? : |
321
|
5 |
0 |
if exists $args->{'timeout'} |
325
|
5 |
0 |
unless exists $args->{'socket_cache'} |
328
|
5 |
0 |
unless exists $args->{'read_length'} |
332
|
5 |
0 |
if defined $args->{'socket_cache'} |
335
|
0 |
5 |
if (defined $cache_key and exists $args->{'socket_cache'}{$cache_key}) { } |
339
|
0 |
4 |
if $error |
340
|
4 |
0 |
if defined $cache_key |
341
|
0 |
4 |
if exists $args->{'on_connect'} |
350
|
0 |
4 |
if (_select(undef, $rout, undef, undef) != 1) |
351
|
0 |
0 |
if defined $cache_key |
361
|
0 |
4 |
unless (defined $rc) |
362
|
0 |
0 |
if $! == 11 or $! == 11 or $! == 4 |
363
|
0 |
0 |
if defined $cache_key |
380
|
0 |
4 |
unless (eval {
do {
($close_connection, $proto, $status, $head, $body, $error, $error_message, $errno_number, $errno_string) = _read_http_message(fileno $soc, @$args{'read_length', 'read_timeout', 'parse_chunked', 'head_as_array', 'method'});
1
}
}) |
382
|
0 |
0 |
if defined $cache_key |
387
|
3 |
0 |
if ($status == 0 or $close_connection or defined $proto and $proto eq 'HTTP/1.0') |
396
|
4 |
0 |
if defined $cache_key |
400
|
1 |
3 |
defined $error ? : |
|
0 |
4 |
defined $error_message ? : |
|
0 |
4 |
defined $errno_number ? : |
|
0 |
4 |
defined $errno_string ? : |
416
|
10 |
40 |
if ($nfound == -1 and $! == 4) |
417
|
10 |
0 |
if $timeout |