| lib/HTTP/Handy.pm | |||
|---|---|---|---|
| Criterion | Covered | Total | % |
| condition | 25 | 75 | 33.3 |
| line | !l | l&&!r | l&&r | condition |
|---|---|---|---|---|
| 21 | 6 | 0 | 0 | $] < "5.006" and not defined &warnings::import |
| 146 | 0 | 0 | 0 | defined $request_line and $request_line ne "" |
| 153 | 0 | 0 | 0 | defined $method and $method eq 'GET' || $method eq 'POST' |
| 169 | 0 | 0 | 0 | defined $path and $path ne "" |
| 193 | 0 | 0 | 0 | $headers{'host'} && $headers{'host'} =~ /:(\d+)$/ |
| 207 | 0 | 0 | 0 | $method eq "POST" and $content_length > 0 |
| 248 | 0 | 0 | 0 | ref $response eq "ARRAY" and scalar @$response == 3 |
| 456 | 1 | 1 | 6 | defined $query and $query ne "" |
| 493 | 2 | 1 | 2 | defined $env->{'HTTP_HX_REQUEST'} && $env->{'HTTP_HX_REQUEST'} eq 'true' |
| 573 | 1 | 0 | 1 | defined $HTTP::Handy::ACCESS_LOG_FH and $current_log_filename eq $HTTP::Handy::CURRENT_LOG_FILE |
| line | l | !l | condition |
|---|---|---|---|
| 188 | 0 | 0 | $headers{'host'} || 'localhost' |
| 197 | 0 | 0 | $headers{'content-length'} || 0 |
| 221 | 0 | 0 | $headers{'content-type'} || '' |
| 256 | 0 | 0 | $STATUS_TEXT{$status} || 'Unknown' |
| 265 | 0 | 0 | shift @h || '' |
| 266 | 0 | 0 | shift @h || '' |
| 288 | 0 | 0 | $headers{'user-agent'} || '' |
| 289 | 0 | 0 | $headers{'referer'} || '' |
| 364 | 19 | 1 | $docroot ||= "." |
| 368 | 20 | 0 | $env->{'PATH_INFO'} || '/' |
| 405 | 14 | 1 | $MIME{$ext} || 'application/octet-stream' |
| 485 | 9 | 2 | $MIME{$ext} || 'application/octet-stream' |
| 501 | 1 | 1 | $code ||= 302 |
| 513 | 0 | 1 | $code ||= 200 |
| 525 | 1 | 2 | $code ||= 200 |
| 537 | 0 | 1 | $code ||= 200 |
| 629 | 0 | 2 | $_[3] || 0 |
| 642 | 0 | 2 | $whence ||= 0 |
| line | l | !l&&r | !l&&!r | condition |
|---|---|---|---|---|
| 153 | 0 | 0 | 0 | $method eq 'GET' || $method eq 'POST' |
| 329 | 0 | 0 | 0 | $STATUS_TEXT{$code} || $message |
| 392 | 0 | 0 | 17 | $file =~ /\x00/ or $file =~ /(?:^|\s)[|<>]|[|<>](?:\s|$)/ |