| line |
true |
false |
branch |
|
21
|
1 |
0 |
if $_[0]->generators->{$_[1]} = $_[2] |
|
29
|
2 |
0 |
if $res->error($error) |
|
|
2 |
20 |
if (my $error = $head->error) |
|
37
|
12 |
8 |
if (-f $file) |
|
39
|
2 |
10 |
unless $size |
|
40
|
2 |
8 |
if $current_size > $size |
|
41
|
2 |
6 |
if $current_size == $size |
|
42
|
2 |
4 |
unless $accept_ranges |
|
51
|
0 |
10 |
unless $fh->syswrite($bytes) == length $bytes |
|
57
|
2 |
7 |
if $current_size < $size |
|
72
|
24 |
44 |
$proto eq 'https' ? : |
|
76
|
64 |
2126 |
if (my $proxy = $req->proxy) |
|
77
|
1984 |
175 |
if $proto eq "http" and not $req->is_handshake and not $socks |
|
87
|
4 |
43 |
if $err and not $err->{'code'} |
|
88
|
2 |
41 |
if $tx->req->is_handshake and not $tx->is_websocket |
|
97
|
4 |
228 |
if uc $req->method eq "CONNECT" |
|
100
|
221 |
7 |
unless my $proxy = $req->proxy and $req->via_proxy |
|
101
|
2 |
5 |
if $proxy->protocol eq "socks" |
|
105
|
2 |
3 |
unless $req->is_handshake or $url->protocol eq "https" |
|
121
|
913 |
58 |
unless grep {$_ == $code;} 301, 302, 303, 307, 308 |
|
125
|
1 |
57 |
if uc $req->method eq "CONNECT" |
|
128
|
0 |
57 |
unless my $location = $res->headers->every_header("Location")->[0] |
|
130
|
21 |
36 |
unless $location->is_abs |
|
132
|
2 |
55 |
if $proto ne "http" and $proto ne "https" or not $location->host |
|
136
|
10 |
45 |
if ($code == 307 or $code == 308) { } |
|
137
|
2 |
8 |
unless my $clone = $req->clone |
|
142
|
12 |
33 |
$code == 303 || $method eq 'POST' ? : |
|
148
|
1 |
52 |
unless $self->compressed |
|
151
|
1 |
52 |
if ($res->content->has_subscribers("sse")) |
|
162
|
1066 |
6 |
$url =~ m[^/|://]u ? : |
|
|
56 |
1072 |
ref $url ? : |
|
166
|
226 |
902 |
if ref $_[0] eq "HASH" |
|
167
|
1103 |
25 |
unless $headers->user_agent |
|
168
|
3 |
1125 |
if (not $self->compressed) { } |
|
|
1103 |
22 |
elsif (not $headers->accept_encoding) { } |
|
172
|
83 |
1045 |
if (@_ > 1) { } |
|
|
25 |
1020 |
elsif (@_) { } |
|
186
|
947 |
75 |
unless $tx->req->is_handshake and $code == 101 |
|
188
|
75 |
0 |
challenge($ws) ? : |
|
195
|
8 |
85 |
ref $_[-1] eq 'ARRAY' ? : |
|
198
|
8 |
85 |
if @$sub |
|
203
|
7 |
86 |
if ($proto eq 'ws') { } |
|
|
5 |
81 |
elsif ($proto eq 'wss') { } |
|
|
1 |
80 |
elsif ($proto eq 'ws+unix') { } |
|
214
|
60 |
6 |
unless exists $options{'charset'} |
|
220
|
10 |
94 |
if (ref $_ eq 'ARRAY') { } |
|
221
|
21 |
89 |
if ref $value eq "HASH" |
|
225
|
27 |
39 |
if ($multipart) |
|
234
|
7 |
32 |
if ($method eq 'GET' or $method eq 'HEAD') { } |
|
248
|
1 |
40 |
unless defined(my $values = $form->{$name}) |
|
249
|
35 |
5 |
unless ref $values eq "ARRAY" |
|
278
|
30 |
25 |
if (ref $value eq 'HASH') { } |
|
281
|
9 |
21 |
if (my $file = delete $value->{'file'}) { } |
|
|
21 |
0 |
elsif (defined(my $content = delete $value->{'content'})) { } |
|
282
|
5 |
4 |
unless ref $file |
|
284
|
7 |
2 |
if $file->isa("Mojo::Asset::File") |
|
295
|
4 |
26 |
unless defined $name |
|
297
|
26 |
0 |
if $charset |
|
302
|
22 |
3 |
if $charset |
|
307
|
3 |
48 |
if not defined $name or defined $headers->content_disposition |
|
309
|
47 |
1 |
if $charset |
|
311
|
25 |
23 |
if defined $filename |
|
322
|
51 |
2188 |
if ($req->via_proxy and my $proxy = $req->proxy) |
|
323
|
3 |
9 |
$proto eq 'https' ? : |
|
329
|
61 |
9 |
unless $_[0]->content_type |