ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> perl-mod_perl
perl-mod_perl
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

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved