You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by "Ruslan U. Zakirov" <cu...@wr.miee.ru> on 2003/03/07 09:59:14 UTC

DECLINE, ERRORs in the middle of hanlers stack

        Hello All!
"Stacked handlers" is a very useful technology, but as I think incomplete.
I need some suggestions.
My project split content handler in the few parts. And each handler
send part of the requested page to user, but sometimes I must stop
proccessing and return DECLINE, redirect user or return some ERROR.
Error appear in the middle of the page.
I want Apache to buffer content and send it after last handler in
chain return OK. Is it possible?
      Beforehead thanks, Ruslan.


Re: DECLINE, ERRORs in the middle of hanlers stack

Posted by Stas Bekman <st...@stason.org>.
Ruslan U. Zakirov wrote:
>         Hello All!
> "Stacked handlers" is a very useful technology, but as I think incomplete.
> I need some suggestions.
> My project split content handler in the few parts. And each handler
> send part of the requested page to user, but sometimes I must stop
> proccessing and return DECLINE, redirect user or return some ERROR.
> Error appear in the middle of the page.
> I want Apache to buffer content and send it after last handler in
> chain return OK. Is it possible?

Sure, you can buffer the data using $r->notes or $r->pnotes and have the last 
handler send it out. But instead of stuffing the content there, you are 
probably better off (more efficient?) to create a buffering class, instantiate 
an instance, and store it in $r->pnotes between invocations.

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com