Matthew Westcott wrote:
I'm using a PerlResponseHandler to control access to selected directories of a site, and I've encountered a similar problem to that described in
http://marc.theaimsgroup.com/?l=apache-modperl&m=106141216914801&w=2
where returning a 'declined' status is skipping other handlers and going straight to Apache's default handler.
with SetHandler there are no other handlers to call - it's the one you choose (perl-script in the below case) or default-handler, that's it.
and this is active over the whole site, using these directives in httpd.conf:
<Location />
SetHandler perl-script
PerlResponseHandler MyApache::Permissions
</Location>
I suspect the problem is on the Apache side; the SetHandler is overriding all other handlers.
yup. both your issue and the one in the link provided are expected behaviors.
Is there any way around this?
it really depends on what you want to do. if you are requesting /foo/bar.php and want php to process the page, just alter your <Location> settings as appropriate.
if you want to post-process that output with mod_perl, then you need to look into output filters.
if you want to dynamically decide who should serve the page - mod_perl if some directory is found, mod_php otherwise, then you can use your own PerlTypeHandler or PerlFixupHandler to set $r->handler for the request based on your own criteria.
HTH
--Geoff