Rob Bloodgood wrote:
Friday, July 16, 2004, 12:54:06 PM, you wrote:
GY> Rob Bloodgood wrote:
I'm using mod_access for Allow/Deny, and on Deny it of course responds
to the client with FORBIDDEN. I've experimented with using a fixup
handler to change this to a REDIRECT,
GY> I don't see how that could happen - once you return something other than OK,
GY> DECLINED, or DONE apache skips right to the logging phase (after sending
GY> some canned content or your configured ErrorDocument). fixups should never
GY> be run after returning FORBIDDEN, SERVER_ERROR, or anything similar from a
GY> phase prior-to fixups themselves.
Well then my next question then becomes: is it possible with mod_perl
to hook into other modules' calls (I'm trying to not duplicate all of
mod_access, merely change the return value)?
eg along the lines of:
sub handler {
my $r = shift;
if ($r->api_call('check_dir_access') == FORBIDDEN) {
$r->headers_out->set(Location => $url);
return REDIRECT;
}
return DECLINED;
}
along with appropriate directives to override mod_access,
<Location />
Deny from all
PerlAccessHandler CTT::302
</Location>
(I know I'm grasping at straws by now, but... if the api call is
exposeable, it becomes possible)
Try:
use Apache::Response ();
use Apache::Const -compile => qw(FORBIDDEN);
sub handler {
$r->custom_response(Apache::FORBIDDEN, $url);
...
}
--
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html