Geoffrey Young wrote:
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

Unfortunately I can't easily do that here - I have plug-in modules which could return any HTTP status, and then some post-processing which makes use of the value of $r->status. I handle ErrorDocument properly though by checking for a non-200 status before modifying it. Then later I simply return OK or DONE depending on wether $r->status eq '200' or not. I suppose I could just return ($r->status() eq '200)?OK:$r->status()

Re-reading the above, I suspect I can improve it a little.


and I explain the internal mechanism here

http://markmail.org/message/hsxqvr37pdvqolgr

That's filled in the gaps, many thanks.

John

Reply via email to