| line |
true |
false |
branch |
|
81
|
2 |
0 |
defined $opt{'resolve_timeout'} ? : |
|
82
|
2 |
0 |
defined $opt{'connect_timeout'} ? : |
|
83
|
0 |
2 |
defined $opt{'resolve_cache'} ? : |
|
84
|
2 |
0 |
defined $opt{'response_timeout'} ? : |
|
101
|
0 |
6 |
ref $headers eq 'HASH' ? : |
|
110
|
6 |
0 |
if $$self{'opt'}{'resolve_timeout'} |
|
112
|
0 |
6 |
unless ($r and $$r{'hostname'} and $$r{'proto'} eq 'http') |
|
113
|
0 |
0 |
if $$self{'opt'}{'resolve_timeout'} |
|
118
|
3 |
3 |
unless ($$r{'ipaddr'}) |
|
119
|
3 |
0 |
if $$self{'opt'}{'resolve_timeout'} |
|
124
|
3 |
0 |
if $$self{'opt'}{'resolve_timeout'} |
|
127
|
3 |
0 |
if $$self{'opt'}{'connect_timeout'} |
|
129
|
0 |
3 |
unless (socket $sock, 2, 1, getprotobyname 'tcp') |
|
130
|
0 |
0 |
if $$self{'opt'}{'connect_timeout'} |
|
135
|
0 |
3 |
unless ($port) |
|
137
|
0 |
0 |
if $$self{'opt'}{'connect_timeout'} |
|
141
|
1 |
2 |
unless (connect $sock, pack_sockaddr_in($port, $$r{'ipaddr'})) |
|
143
|
0 |
0 |
if $$self{'opt'}{'connect_timeout'} |
|
159
|
0 |
2 |
unless ($wr) |
|
161
|
0 |
0 |
if $$self{'opt'}{'connect_timeout'} |
|
166
|
0 |
2 |
unless ($self->_set_nonblocking($sock, 1)) |
|
168
|
0 |
0 |
if $$self{'opt'}{'connect_timeout'} |
|
181
|
2 |
0 |
if $$self{'opt'}{'connect_timeout'} |
|
184
|
1 |
5 |
if ($was_timeout) |
|
200
|
0 |
3 |
unless ($req) |
|
205
|
0 |
3 |
if $$req{'done'} |
|
207
|
2 |
1 |
unless defined $$req{'result'}{'body'} |
|
214
|
1 |
1 |
if (defined $rd and $rd == 0) |
|
218
|
1 |
0 |
if $rawheaders =~ m[^HTTP/1\.1 (\d+)] |
|
220
|
14 |
1 |
if ($line =~ /^([^:]+): ([^\r\n]+)/) |
|
227
|
1 |
0 |
if $$req{'sock'} |
|
243
|
0 |
2 |
unless ($req) |
|
248
|
0 |
2 |
if $$req{'done'} |
|
257
|
2 |
0 |
if $$self{'opt'}{'response_timeout'} |
|
263
|
1 |
1 |
if ($was_timeout) |
|
283
|
0 |
0 |
if ($$req{'done'}) |
|
288
|
0 |
0 |
if $res and $$res{'id'} and $$res{'done'} |
|
290
|
0 |
0 |
wantarray ? : |
|
311
|
1 |
1 |
if $$req{'sock'} |
|
319
|
6 |
0 |
if ($url and $url =~ m[^([hH][tT][tT][pP])://([^/]+)(.*)$]) |
|
321
|
3 |
3 |
$3 eq '' ? : |
|
332
|
1 |
5 |
if $hostname =~ /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/ |
|
333
|
0 |
5 |
if exists $$self{'resolve_cache'}{$hostname} |
|
334
|
0 |
5 |
if $$self{'opt'}{'resolve_cache'} and $$self{'opt'}{'resolve_cache'} ne 'local' and exists $$global_resolve_cache{$hostname} |
|
339
|
5 |
0 |
if ($$self{'opt'}{'resolve_cache'}) |
|
340
|
0 |
5 |
if ($$self{'opt'}{'resolve_cache'} eq 'local') { } |
|
352
|
0 |
5 |
unless my $flags = fcntl($sock, 3, 0) |
|
354
|
0 |
5 |
unless fcntl $sock, 4, $flags | ($nonblocking_on && 2048) |