Ruslan U. Zakirov wrote:
On Sat, 8 Mar 2003, Stas Bekman wrote:

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.



Hello Stas and other! Thanks for idea, but it force me to change all scripts.

Another alternative is to try using Apache::Filter for the buffering and $r->notes/pnotes for flow control (so you can inform Apache::Filter what to do with the buffered data). mod_perl 2.0 filters are probably more flexible, but I see no reason why mp1's Apache::Filter won't do the job.



__________________________________________________________________ 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



Reply via email to