Re: response data

[prev] [thread] [next] [Date index for 2004/12/17]

From: Slava Bizyayev
Subject: Re: response data
Date: 17:33 on 17 Dec 2004
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

(message missing)

response data
Vadim 20:32 on 15 Dec 2004

Re: response data
Perrin Harkins 19:17 on 15 Dec 2004

Re: response data
Vadim 11:18 on 16 Dec 2004

Re: response data
Perrin Harkins 19:07 on 16 Dec 2004

Re: response data
Vadim 12:09 on 17 Dec 2004

Re: response data
Slava Bizyayev 17:33 on 17 Dec 2004

Re: response data
Vadim 14:01 on 20 Dec 2004

Re: response data
Slava Bizyayev 12:24 on 20 Dec 2004

Generated at 11:26 on 21 Dec 2004 by mariachi v0.52