Hello.

I'm doing some testing/debugging on a newly built server (Apache
2.0.52, mod_perl 2.0.3) and find that both PerlAuthenHandler and
PerlAuthzHandler are ignored. The weird thing is: other Perl*Handlers,
including PerlAccessHandler, work as expected (expected by me, that
is): they block access to mydomain.com/test in the setup copied below
and write a line in error_log.

I am afraid I am making a stupid mistake somewhere, but I can't find
where. Any help would be greatly appreciated.

Thanks.

Martijn.

-------

In httpd.conf:

PerlModule Testhandler

<Location /test>
# PerlAccessHandler TestHandler
# the above line *does* block access
PerlAuthenHandler TestHandler
PerlAuthzHandler TestHandler
# same problem if only one of the two lines occurs
</Location>

-------

Testhandler.pm:

package TestHandler;
use strict;

use Apache2::Log;
use Apache2::Const qw(:common :remotehost OK FORBIDDEN);
use Apache2::RequestRec ();

sub handler  {
       my ($r) = shift;
       my $url = $r->uri;
       $r->log_error('You are visiting ' . $url . '!');
       return FORBIDDEN;
# DECLINED instead of FORBIDDEN doesn't work either
}

1;

Reply via email to