cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Unico Hommes <>
Subject Re: Invalid content length, revisited
Date Fri, 15 Oct 2004 14:07:45 GMT
Vadim Gritsenko wrote:

> Unico Hommes wrote:
>> Vadim Gritsenko wrote:
>>> Unico Hommes wrote:
>>>> Oh I see now. The ResourceReader also sets the content length on 
>>>> the response. It *really* shouldn't do that IMHO. Anybody know why 
>>>> it does that?
>>> I see that EnvironmentWrapper ignores set content length. And it has 
>>> RequestWrapper. BUT IT DOES NOT HAVE ResponseWrapper! I guess that's 
>>> the real problem.
>>> ResourceReader probably should be changed to set content length on 
>>> the environment, but this is fix in only one case. ResponseWrapper 
>>> seems to be the fix for all cases at once. Or, am I missing something?
>> What about FOM though? Doesn't a flowscript run within an 
>> EnvironmentWrapper? If so, having WrapperResponse ignore calls to 
>> setHeader() and related methods would be undesirable.
> Shouldn't it / could it run under MutableEnvironmentFacade?

I think that in the following scenario there will be an 
EnvironmentWrapper in there somewhere:


<map:match pattern="bar">
  <map:generate src="bar"/>

<map:match pattern="foo">
  <map:call function="foo"/>

<map:match pattern="foobar">
  <map:generate src="cocoon:/foo"/>


function foo() {
  cocoon.response.setHeader("foo", "bar");

Because function foo() is called via a SitemapSource its environment is 
a WrappedEnvironment  (don't know, but I am guessing) and the call to 
setHeader will be to WrappedResponse?


View raw message