here's my solution to handler loop prevention when the initial request to a handler isn't necessarily the main request:
sub handler {
my $r = shift;
my $mr = $r->main || $r;
if ($mr->notes->get(__PACKAGE__ . '::SEEN')) {
$r->log->debug("We are looping.");
return Apache::DECLINED;
}
$mr->notes->set(__PACKAGE__ . '::SEEN', 1);
# ... do stuff, including other lookup_uri/lookup_file requests.
$mr->notes->unset(__PACKAGE__ . '::SEEN');
return Apache::OK; # or whatever other status
}
comments?
.dorian
