in reply to mod_perl, getting filename or mime type
I think the reasonable approach is to look at just the uri:
sub handler { my $r = shift; my $log = $r->log; # The real content type is not available # until the ContentHandler my ($content_type) = $r->uri() =~ /\.(\w+)$/; my %ignore = map {$_ => 1} qw(gif jpg jpeg png css); if ($ignore{lc($content_type)}) { $log->debug( "Allowing access to ($content_type)." ); return DECLINED; } ...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: mod_perl, getting filename or mime type
by pingo (Hermit) on Nov 15, 2006 at 14:17 UTC |