| line |
true |
false |
branch |
|
359
|
48 |
939 |
if exists $params{$_} |
|
363
|
1 |
46 |
if (my $headers = delete $params{'headers'}) |
|
364
|
1 |
0 |
ref $headers eq 'HASH' ? : |
|
|
0 |
1 |
ref $headers eq 'ARRAY' ? : |
|
370
|
1 |
46 |
if (my $more = delete $params{'+headers'}) |
|
371
|
1 |
0 |
ref $more eq 'HASH' ? : |
|
|
0 |
1 |
ref $more eq 'ARRAY' ? : |
|
389
|
0 |
47 |
if (exists $params{'ip_tos'}) |
|
392
|
0 |
0 |
if defined $ip_tos and $ip_tos eq 'lowdelay' |
|
393
|
0 |
0 |
if defined $ip_tos and $ip_tos eq 'throughput' |
|
394
|
0 |
0 |
if defined $ip_tos and $ip_tos eq 'reliability' |
|
395
|
0 |
0 |
if defined $ip_tos and $ip_tos eq 'mincost' |
|
401
|
10 |
37 |
unless defined $self->{'user_agent'} |
|
402
|
35 |
12 |
unless defined $self->{'max_redirects'} |
|
403
|
34 |
13 |
unless defined $self->{'max_in_flight'} |
|
404
|
30 |
17 |
unless defined $self->{'pipeline'} |
|
432
|
0 |
98 |
if (my $socks_params = $self->{'socks_params'}) |
|
440
|
0 |
98 |
if ($args{'SSL'}) |
|
451
|
0 |
392 |
defined $self->{$_} ? : |
|
462
|
0 |
90 |
if defined $self->{'ip_tos'} |
|
477
|
0 |
139 |
unless my $loop = $self->get_loop |
|
488
|
13 |
38 |
if $conn->is_idle and $conn->read_handle |
|
492
|
122 |
4 |
unless $ready |
|
498
|
28 |
98 |
if ($max and @$conns >= $max) |
|
517
|
2 |
63 |
if (my $next = &first(sub {
not $_->connecting;
}
, @$ready_queue)) |
|
532
|
7 |
0 |
unless $f->is_cancelled |
|
538
|
2 |
5 |
if (my $next = &first(sub {
not $_->connecting;
}
, @$ready_queue)) |
|
770
|
0 |
135 |
if ($self->{'require_SSL'} and not $SSL) |
|
775
|
33 |
102 |
if ($Net::Async::HTTP::metrics) |
|
789
|
0 |
0 |
/^SSL_/ ? : |
|
793
|
1 |
126 |
$args{'on_ready'} ? : |
|
806
|
1 |
112 |
if ($Net::Async::HTTP::metrics) |
|
814
|
0 |
127 |
$SSL ? : |
|
815
|
0 |
135 |
defined $args{'family'} ? : |
|
|
0 |
135 |
$SSL ? : |
|
823
|
104 |
9 |
unless $response->is_redirect and defined $response->header('Location') |
|
841
|
1 |
127 |
defined $args{'max_redirects'} ? : |
|
851
|
7 |
128 |
if ($previous_f) |
|
857
|
4 |
3 |
if ($location =~ m[^http(?:s?)://]) { } |
|
|
3 |
0 |
elsif ($location =~ m[^/]) { } |
|
861
|
0 |
3 |
$port != 80 ? : |
|
869
|
0 |
7 |
unless ($loc_uri) |
|
875
|
2 |
5 |
if $args{'on_redirect'} |
|
884
|
95 |
40 |
if (defined $uri->scheme and $uri->scheme =~ /^http(s?)$/) |
|
885
|
10 |
85 |
unless defined $host |
|
886
|
14 |
81 |
unless defined $port |
|
890
|
0 |
135 |
unless defined $host |
|
891
|
0 |
39 |
$ssl ? : |
|
|
39 |
96 |
unless defined $port |
|
904
|
0 |
9 |
if @_ |
|
906
|
9 |
106 |
if $redirects and $response->is_redirect |
|
914
|
15 |
113 |
if $f->failure or $f->is_cancelled |
|
918
|
3 |
125 |
if ($self->{'fail_on_error'}) |
|
923
|
2 |
1 |
if ($code =~ /^[45]/) |
|
942
|
81 |
47 |
if (my $uri = delete $args{'uri'}) { } |
|
|
0 |
47 |
elsif (not defined $args{'request'}) { } |
|
949
|
5 |
123 |
if ($args{'on_header'}) { } |
|
|
123 |
0 |
elsif ($args{'on_response'} or defined wantarray) { } |
|
956
|
73 |
99 |
if (@_) { } |
|
970
|
33 |
95 |
defined $args{'timeout'} ? : |
|
974
|
33 |
95 |
if (defined $timeout) |
|
991
|
84 |
44 |
if $on_error |
|
993
|
79 |
49 |
if (my $on_response = delete $args{'on_response'}) |
|
1005
|
75 |
53 |
if defined wantarray |
|
1015
|
14 |
74 |
if (not ref $uri) { } |
|
|
0 |
74 |
elsif (&blessed($uri) and not $uri->isa('URI')) { } |
|
1029
|
2 |
86 |
if ($method eq 'POST') { } |
|
1030
|
0 |
2 |
unless defined $args{'content'} |
|
1034
|
0 |
2 |
unless ref $args{'content'} or defined $args{'content_type'} |
|
1041
|
2 |
84 |
if (defined $args{'content'}) |
|
1042
|
0 |
2 |
unless defined $args{'content_type'} |
|
1053
|
1 |
87 |
if ($headers and &reftype($headers) eq 'ARRAY') { } |
|
|
1 |
172 |
elsif ($headers and &reftype($headers) eq 'HASH') { } |
|
1062
|
1 |
87 |
if (defined $uri->userinfo) { } |
|
|
1 |
172 |
elsif (defined $args{'user'} and defined $args{'pass'}) { } |
|
1070
|
2 |
86 |
if (defined $user and defined $pass) |
|
1142
|
34 |
101 |
if length $self->{'user_agent'} |
|
1143
|
1 |
134 |
if ($self->{'close_after_request'}) { } |
|
1154
|
2 |
133 |
if $self->{'cookie_jar'} |
|
1169
|
2 |
102 |
if $self->{'cookie_jar'} |
|
1276
|
2 |
0 |
if (@_) { } |
|
1279
|
0 |
2 |
unless my $d = $DECODERS{$name} |