Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 1136 invoked from network); 18 Oct 2004 15:06:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 18 Oct 2004 15:06:38 -0000 Received: (qmail 43811 invoked by uid 500); 18 Oct 2004 15:06:32 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 43774 invoked by uid 500); 18 Oct 2004 15:06:32 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: dev@cocoon.apache.org Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 43754 invoked by uid 99); 18 Oct 2004 15:06:32 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Received: from [213.133.34.195] (HELO panacea.is.nl) (213.133.34.195) by apache.org (qpsmtpd/0.28) with ESMTP; Mon, 18 Oct 2004 08:06:31 -0700 Received: from hai01.hippo.local ([213.133.51.241]) by panacea.is.nl with Microsoft SMTPSVC(5.0.2195.4905); Mon, 18 Oct 2004 17:07:09 +0200 Received: from [10.10.100.212] ([10.10.100.212]) by hai01.hippo.local with Microsoft SMTPSVC(5.0.2195.6713); Mon, 18 Oct 2004 17:06:28 +0200 Message-ID: <4173DBF4.8030607@hippo.nl> Date: Mon, 18 Oct 2004 17:06:28 +0200 From: Unico Hommes User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: dev@cocoon.apache.org Subject: Re: svn commit: rev 55002 - cocoon/trunk/src/java/org/apache/cocoon/environment/wrapper References: <20041018131025.20034.qmail@minotaur.apache.org> <4173CA9A.5080206@anyware-tech.com> <4173D795.5060500@hippo.nl> <4173DA2B.5060802@apache.org> In-Reply-To: <4173DA2B.5060802@apache.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 18 Oct 2004 15:06:28.0458 (UTC) FILETIME=[0B3354A0:01C4B524] X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Sylvain Wallez wrote: > Unico Hommes wrote: > >> Sylvain Wallez wrote: >> >>> unico@apache.org wrote: >>> >>>> Author: unico >>>> Date: Mon Oct 18 06:10:24 2004 >>>> New Revision: 55002 >>>> >>>> Added: >>>> >>>> cocoon/trunk/src/java/org/apache/cocoon/environment/wrapper/ResponseWrapper.java >>>> >>>> Modified: >>>> >>>> cocoon/trunk/src/java/org/apache/cocoon/environment/wrapper/EnvironmentWrapper.java >>>> >>>> Log: >>>> introduce WrappedResponse for preventing internal requests to >>>> modify the response headers >>>> as discussed here: >>>> http://marc.theaimsgroup.com/?t=109783260100005&r=1&w=2 >>>> >>>> >>> >>> I haven't followed that discussion, but I think these changes will >>> break internal redirects for external requests, as it won't allow to >>> set headers in that case. >>> >>> Example : >>> >>> >>> >>> >>> The headers set by the called pipeline will be ignored although they >>> should not. A check that the wrapped environment is external and >>> avoid wrapping in that case should be enough, I guess. >>> >> >> I see, the TreeProcessor wraps the environment in a >> ForwardEnvironmentWrapper in the case of cocoon redirects. Hmm, but >> would the check on whether the wrapped environment is an external one >> really make the correct distinction though? Wouldn't that check also >> match the scenario that started this: >> >> >> >> >> >> >> >> >> >> >> >> Isn't the environment in which the "transformation" pipeline is >> processed also an environment wrapping an external one? > > > > Mmmh... you're right :-) > > I guess we should make the distinction between wrappers for internal > redirects, that would not wrap the response, and wrappers for cocoon: > sources that must wrap the response. A simple additional boolean in > the EnvironmentWrapper constructor should to the trick. > Yeah, that should do the trick. I'll take care of it. Thanks for catching this :-) -- Unico