blib/lib/Apache/AxKit/Plugin/NotFoundIfPathInfo.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 4 | 6 | 66.6 |
branch | n/a | ||
condition | n/a | ||
subroutine | 2 | 2 | 100.0 |
pod | n/a | ||
total | 6 | 8 | 75.0 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package Apache::AxKit::Plugin::NotFoundIfPathInfo; | ||||||
2 | |||||||
3 | 1 | 1 | 20068 | use strict; | |||
1 | 2 | ||||||
1 | 40 | ||||||
4 | 1 | 1 | 369 | use Apache::Constants qw(OK NOT_FOUND); | |||
0 | |||||||
0 | |||||||
5 | use Apache::Request; | ||||||
6 | |||||||
7 | our $VERSION = '1.01'; | ||||||
8 | |||||||
9 | sub handler { | ||||||
10 | my $r = shift; | ||||||
11 | if (length($r->path_info)) { | ||||||
12 | $r->log->error("File does not exist: " . $r->filename . $r->path_info); | ||||||
13 | return NOT_FOUND; | ||||||
14 | } | ||||||
15 | else { | ||||||
16 | return OK; | ||||||
17 | } | ||||||
18 | } | ||||||
19 | |||||||
20 | 1; | ||||||
21 | __END__ |