Hi Vadim,

On Fri, 2004-12-17 at 06:09, Vadim wrote:
> i try to get a response data in the PerlCleanupHandler stage to do some 
> internal actions. This actions do not perform any modifications on a response 
> data. So i dont want to keep user waiting. And i supposed untill $r object is 
> alive it's possible to get the data. But it looks like i mistake. and it's 
> impossible.
> 
> The solution is to register the cleanup handler in the PerlResponseHandler 
> script and to pass the data and $r object as the arguments:
> 
> r->pool->cleanup_register(\&MyApache::MyProxy::handler, { r => $r, data => 
> $data} );

You cannot transfer parameters this way, however $r is available and
_is_ correct inside the Cleanup phase of the request processing flow.
You can transfer a copy of your response to the cleanup handler using
pnotes if necessary. Alternatively, you can chain your cleanup handler
with your content generation handler using Apache::Filter chain, so that
all the work appears inside the content generation phase.

Hope this helps,
Slava



-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html

Reply via email to