perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geoffrey Young <>
Subject Re: return value for response handler
Date Thu, 12 Jun 2008 15:21:04 GMT

Torsten Foertsch wrote:
> On Tue 10 Jun 2008, John ORourke wrote:
>> I had a bug with an interesting side effect which I want to understand.
>> I wanted to redirect the user's browser, and in my response handler I
>> was setting $r->status(302) but returning Apache2::Const::OK instead of
>> the correct Apache2::Const::DONE.

return Apache2::Const::REDIRECT

>> This caused Apache to perform an internal redirect.  Can someone explain
>> what was happening in terms of handlers and subrequests or point me to
>> the right doc page?
> This is just a guess. So it may be completely wrong. But good old CGI allows 
> you to send "Status: 200" along with a Location header to perform an internal 
> redirect.
> mod_perl does the same if the perl-script handler is used and PerlOptions 
> +ParseHeaders. So I'd dig in that direction if that matches your setup. 
> Otherwise it is probably an Apache thing.
> If you find out what it was tell me, please.

this thread mentions it a few times

and I explain the internal mechanism here

and I know I explained this at length dev@ in at least one drawn out 
occasion, but I can't find it at the moment.



View raw message