Return-Path: Delivered-To: apmail-perl-modperl-archive@www.apache.org Received: (qmail 11357 invoked from network); 14 Mar 2010 03:22:00 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 14 Mar 2010 03:22:00 -0000 Received: (qmail 19361 invoked by uid 500); 14 Mar 2010 03:21:18 -0000 Delivered-To: apmail-perl-modperl-archive@perl.apache.org Received: (qmail 19160 invoked by uid 500); 14 Mar 2010 03:21:15 -0000 Mailing-List: contact modperl-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list modperl@perl.apache.org Received: (qmail 19153 invoked by uid 99); 14 Mar 2010 03:21:15 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 14 Mar 2010 03:21:15 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of adam.prime@utoronto.ca designates 128.100.132.151 as permitted sender) Received: from [128.100.132.151] (HELO bureau61.ns.utoronto.ca) (128.100.132.151) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 14 Mar 2010 03:21:11 +0000 Received: from [192.168.2.192] (bas1-toronto05-1088885779.dsl.bell.ca [64.231.20.19]) (authenticated bits=0) by bureau61.ns.utoronto.ca (8.13.8/8.13.8) with ESMTP id o2E3Kjq9001933 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 13 Mar 2010 22:20:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=utoronto.ca; s=beta; t=1268536850; bh=8mQ27/2oYQre8oZC6Dvtaiih/Il+DztQMaAU2QOJ8zY=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=xrkAT4Vb0/G9/+bzzdC1eySSHNFcZnkrb9otsarauhvZLtaIxqxSZPtx626XR21F2 7Q9UeXy/p95HnK2ClPFhwM1Jclfxjbr/35Ujbn/eDIZABRQyf7lEBDgJKtJnrlR5nt HZ7b/B8+M1qcLOYPmlaGZ8C47j87HDsI8T43Qxg4= Message-ID: <4B9C53E9.3090108@utoronto.ca> Date: Sat, 13 Mar 2010 22:11:37 -0500 From: Adam Prime User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: Iain Kennedy CC: modperl@perl.apache.org Subject: Re: Upgrading chained response handlers to mod_perl2 References: <4B98BE2F.7040406@psand.net> <4B9C2045.2080801@psand.net> In-Reply-To: <4B9C2045.2080801@psand.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Iain Kennedy wrote: > Hi, > > Is there a data structure that gets passed to each response handler in > the chain that the processed file can be stored in (like $f->ctx)? > > Can the old mod_perl1 ->filter_input behaviour be done by manipulating > the input_filter or output_filter stacks? > > Is what I'm trying to do vaguely sane, even? With the following directive: > > PerlResponseHandler +Module::Test1 +Module::Test2 I'm not sure, but i don't think you can really do that in mp2, i think you need to read about how filters work in mp2, then do something like PerlResponseHandler Module::Test1 PerlOutputFilter Module::Test2 where Module::Test2 has been rewritten using the filter API. Geoff Young gave a talk about filters at an apachecon many moons ago that i found particularly helpful, you can still find the slides here: http://www.modperlcookbook.org/~geoff/slides/ApacheCon/2006/mp2_filters-printable.pdf.gz > Having both Test1 and Test2 process the HTML response body in turn with > mod_perl1 was pretty straightforward. I reckon I must be missing > something pretty obvious, surely? > > Iain HTH, Adam