Re: [MP2]how to catch the response body of a subrequest?

2008-07-01 Thread titetluc titetluc
Less than half an hour to have an answer And the code is correctly running (my work now is to understand this cryptic code ;-)) Thanks a lot 2008/7/1 Torsten Foertsch <[EMAIL PROTECTED]>: > On Tue 01 Jul 2008, titetluc titetluc wrote: > > I am facing a problem: I would like to call sub-req

Re: [MP2]how to catch the response body of a subrequest?

2008-07-01 Thread Torsten Foertsch
On Tue 01 Jul 2008, titetluc titetluc wrote: > I am facing a problem: I would like to call sub-requests, but the content > of these sub-requests should not 'pollute' the main request. my $content=''; my $subr=$r->lookup_uri( $tmpl ); $subr->add_output_filter( sub {

[MP2]how to catch the response body of a subrequest?

2008-07-01 Thread titetluc titetluc
Hello all, I am facing a problem: I would like to call sub-requests, but the content of these sub-requests should not 'pollute' the main request. Some times ago, Torsten Foertsch sent the same question on the mod_perl mailing list (see http://marc.info/?l=apache-modperl&m=111720092815754&w=2) Th

Re: [MP2]how to catch the response body of a subrequest?

2005-05-27 Thread Dorian Taylor
> Or rewrite it to stash data from $bb->flatten, instead of stashing > brigades. In which case, no extra API is needed. this is true. i'll put something up on cpan tonight. .dorian

Re: [MP2]how to catch the response body of a subrequest?

2005-05-27 Thread Stas Bekman
Dorian Taylor wrote: http://search.cpan.org/dist/Apache-TrapSubRequest/lib/Apache/TrapSubRequest.pm this is actually broken. it needs the ap_save_brigade patch. i'm in a c mood so i think i'll hook up an xs version tonight. thanks for reminding me. Or rewrite it to stash data from $bb->flatt

Re: [MP2]how to catch the response body of a subrequest?

2005-05-27 Thread Dorian Taylor
> http://search.cpan.org/dist/Apache-TrapSubRequest/lib/Apache/TrapSubRequest.pm this is actually broken. it needs the ap_save_brigade patch. i'm in a c mood so i think i'll hook up an xs version tonight. thanks for reminding me. .dorian

Re: [MP2]how to catch the response body of a subrequest?

2005-05-27 Thread Stas Bekman
Torsten Foertsch wrote: Hi, is it possible to run a subrequest and send the output to a PerlResponseHandler instead of the browser. I think it can be done with a filter that gathers all output ... Is there anything available like $subr=$r->lookup_uri(...); $response_body=$subr->run_with_out

Re: [MP2]how to catch the response body of a subrequest?

2005-05-27 Thread Arne Skjaerholt
According to the documentation for Apache (mp1 admittedly, but I don't think this has changed in apache-2): "Apache provides a sub-request mechanism to lookup a uri or filename, performing all access checks, etc., without actually running the response phase of the given request." So that's probably

[MP2]how to catch the response body of a subrequest?

2005-05-27 Thread Torsten Foertsch
Hi, is it possible to run a subrequest and send the output to a PerlResponseHandler instead of the browser. I think it can be done with a filter that gathers all output ... Is there anything available like $subr=$r->lookup_uri(...); $response_body=$subr->run_with_output_to_me; if( $subr->statu