Re: [MP2]how to catch the response body of a subrequest?
by Torsten Foertsch other posts by this author
Jul 1 2008 5:14AM messages near this date
[MP2]how to catch the response body of a subrequest?
|
Re: [MP2]how to catch the response body of a subrequest?
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 {
my ($f, $bb) = @_;
while (my $e = $bb-> first) {
$e-> read(my $buf);
$content.=$buf;
$e-> delete;
}
return Apache2::Const::OK;
} );
$subr-> run;
Torsten
--
Need professional mod_perl support?
Just hire me: torsten.foertsch@gmx.net
Thread:
Titetluc Titetluc
Torsten Foertsch
Titetluc Titetluc
|