| blib/lib/PAGI/App/File.pm | |||
|---|---|---|---|
| Criterion | Covered | Total | % |
| condition | 27 | 46 | 58.7 |
| line | !l | l&&!r | l&&r | condition |
|---|---|---|---|---|
| 141 | 78 | 0 | 5 | $component =~ /^\./ and $component ne "" |
| 162 | 3 | 0 | 21 | -f $file_path and -r $file_path |
| 169 | 0 | 1 | 20 | $real_path and index($real_path, $root) == 0 |
| 181 | 18 | 0 | 2 | $if_none_match and $if_none_match eq $etag |
| 197 | 15 | 0 | 3 | $range and $range =~ /bytes=(\d*)-(\d*)/ |
| line | l | !l | condition |
|---|---|---|---|
| 92 | 45 | 0 | $args{'root'} // "." |
| 100 | 0 | 45 | $args{'default_type'} // "application/octet-stream" |
| 0 | 45 | $args{'index'} // ["index.html", "index.htm"] | |
| 2 | 43 | $args{'handle_ranges'} // 1 | |
| 114 | 44 | 0 | $scope->{'method'} // "" |
| 120 | 43 | 0 | $scope->{'path'} // "/" |
| 193 | 18 | 0 | $ext // "" |
| 265 | 40 | 0 | $scope->{'headers'} // [] |
| line | l | !l&&r | !l&&!r | condition |
|---|---|---|---|---|
| 94 | 45 | 0 | 0 | Cwd::realpath($root) // $root |
| 115 | 42 | 1 | 1 | $method eq "GET" or $method eq "HEAD" |
| 193 | 16 | 2 | 0 | $MIME_TYPES{lc($ext // "")} // $self->{'default_type'} |
| 200 | 0 | 0 | 3 | $end eq "" or $end >= $size |
| 202 | 0 | 0 | 3 | $start > $end or $start >= $size |