On Fri, 14 Mar 2003, Richard Clarke wrote:

> package AC::Centry::Access;
> $AC::Centry::Access::VERSION = qw$Revision: 1.2 $[1];
>
> use strict;
> use Apache::Constants qw(:common);
> use AC::Centry::Tool();
>
> # handler()
> # Process requests to protected URI's
> sub handler {
>     my $r = shift;
>     my $uri = $r->the_request;
>     return OK unless $r->is_initial_req; # stops dbl execution

"Stops dbl execution" _after_ this point, of course. If you request a
directory, the server will return an internal redirect to $dir/index.html
(or whatever) -- that would make your handler run twice up to this point.

Try taking that code out and running the test with a URL that points to a
file.

Also, I think it's better to return DECLINED from your Access handler if
you're not returning FORBIDDEN, rather than OK, since there may be other
handlers that need to work on the request. And if not now, maybe in the
future.

- nick

-- 

~~~~~~~~~~~~~~~~~~~~
Nick Tonkin   {|8^)>

Reply via email to