pingo has asked for the wisdom of the Perl Monks concerning the following question:
I have a pair of mod_perl (Apache 2.2.3) modules that attach to the Authen/Authz request phases, and they work just fine. Problem is, I would like to be able to decline handling of certain content (images, for instance). Getting the mime type seems to be impossible, since that is done in the Type phase, if I understand things correctly. Getting the filename works, except when the url refers to a directory (ends in a slash), in which case $r->filename() just returns the path to the directory on disk. (Which is kind of strange, by the way, I would have expected it to return the filename too, based on DirectoryIndex.)
I guess I could just assume that anything that ends in a slash should be protected, but I'm not entirely happy about such a solution. Any help or ideas would be appreciated.