[Israel.pm] mod_perl question: Ending an apache request withan OK status inside a PerlFixupHandler?

Yuval Yaari yuval at windax.com
Wed Apr 28 09:11:25 PDT 2004

Issac Goldstand wrote:

>>$r->custom_response(Apache::Constants::FORBIDDEN(), $ttoutput);
>>return Apache::Constants::FORBIDDEN();
>This is the correct way to do it.
Probably... :)

>>Also since I put it all in a subroutine called report_error, I call it
>>(from the handler subroutine) as "return report_error" - is there a way
>>to return the status from inside that subroutine (just to make
>>everything look nicer, it's really not that important)?
>You *are* returning status.  The status is FORBIDDEN.
>Apache won't let you send content if a handler decides to abort the handler
>chain.  That's what you're doinbg with custom_response: setting the content
>to be returned with the forbidden error code.
I just wanted to return the status from within send_report and not from 
handler, but it doesn't really matter.

As long as it works, I'm happy :)


More information about the Perl mailing list