You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Bertrand Delacretaz <bd...@apache.org> on 2005/09/12 14:25:31 UTC

Re: ResponseWrapper eats my HTTP header settings, as does map:mount ;-(

Le 8 sept. 05, à 12:42, Pier Fumagalli a écrit :

> On 8 Sep 2005, at 10:39, Bertrand Delacretaz wrote:
>> ---Good idea - having had a look at it, maybe ResponseWrapper should 
>> let some headers go through?
>> The cache-related ones (Expires, Cache-Control, Last-Modified) make 
>> sense to me.
>
> I would be against it. AFAIK, the ResponseWrapper is the one used 
> (also) in CIncludes and sitemap aggregations, right? That would 
> generate massive race conditions when for some reason one of the 
> included pipelines specifies caching.
>
> Have you tried using <map:redirect/>? That should preserve the caching 
> headers and AFAIK would allow you to expose an internal-only pipeline, 
> right?..

I see your point - in the meantime I've worked around the problem by 
storing cache-related info in a Request attribute and generating the 
headers later in a non-internal part of pipeline.

I also found out that (in the 2.1.7 release at least), pipelines called 
via map:mount also eat HTTP response headers set in code , *including* 
content-length which might have been set by the mounted pipeline.

There's a related discussion at 
http://marc.theaimsgroup.com/?t=111746450000002&r=1&w=2, I think this 
deserves further investigation, in my view map:mount should completely 
delegate to the mounted sitemap, without filtering.

-Bertrand

Re: ResponseWrapper eats my HTTP header settings, as does map:mount ;-(

Posted by Bertrand Delacretaz <bd...@apache.org>.
Le 12 sept. 05, à 15:57, Carsten Ziegeler a écrit :

> ...Yepp - so the question is: which changes broke this?

Most probably related to 
http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=109785174903101&w=2

> And we should solve this for 2.1.8.

Yes - I don't have much time now as I have to deliver a site running 
under 2.1.7 with caching, Real Soon Now ;-)
But I agree, we need a test for this and then a fix.

-Bertrand

Re: ResponseWrapper eats my HTTP header settings, as does map:mount ;-(

Posted by Carsten Ziegeler <cz...@apache.org>.
Pier Fumagalli wrote:
> On 12 Sep 2005, at 14:47, Bertrand Delacretaz wrote:
> 
>>Le 12 sept. 05, à 15:31, Carsten Ziegeler a écrit :
>>
>>
>>>...What does this currently mean? If I set headers in a sub  
>>>sitemap they
>>>are ignored?..
>>>
>>
>>That's what I'm seeing, my mounted sitemap has an Action which sets  
>>HTTP headers, and a Serializer which sets Content-Length, and they  
>>are all eaten by ResponseWrapper and EnvironmentWrapper, respectively.
> 
> 
> Shit, this is _really_ bad... (Sorry the language).
> 
> This would mean that 2.1.7 (and the current branch head) can't be  
> used in production when Caching is involved.
> 
Yepp - so the question is: which changes broke this?
And we should solve this for 2.1.8.

Carsten

-- 
Carsten Ziegeler - Open Source Group, S&N AG
http://www.s-und-n.de
http://www.osoco.org/weblogs/rael/

Re: ResponseWrapper eats my HTTP header settings, as does map:mount ;-(

Posted by Pier Fumagalli <pi...@betaversion.org>.
On 12 Sep 2005, at 14:47, Bertrand Delacretaz wrote:
> Le 12 sept. 05, à 15:31, Carsten Ziegeler a écrit :
>
>> ...What does this currently mean? If I set headers in a sub  
>> sitemap they
>> are ignored?..
>>
>
> That's what I'm seeing, my mounted sitemap has an Action which sets  
> HTTP headers, and a Serializer which sets Content-Length, and they  
> are all eaten by ResponseWrapper and EnvironmentWrapper, respectively.

Shit, this is _really_ bad... (Sorry the language).

This would mean that 2.1.7 (and the current branch head) can't be  
used in production when Caching is involved.

     Pier


Re: ResponseWrapper eats my HTTP header settings, as does map:mount ;-(

Posted by Bertrand Delacretaz <bd...@apache.org>.
Le 12 sept. 05, à 15:31, Carsten Ziegeler a écrit :
> ...What does this currently mean? If I set headers in a sub sitemap 
> they
> are ignored?..

That's what I'm seeing, my mounted sitemap has an Action which sets 
HTTP headers, and a Serializer which sets Content-Length, and they are 
all eaten by ResponseWrapper and EnvironmentWrapper, respectively.

-Bertrand

Re: ResponseWrapper eats my HTTP header settings, as does map:mount ;-(

Posted by Carsten Ziegeler <cz...@apache.org>.
Bertrand Delacretaz wrote:
> 
> I see your point - in the meantime I've worked around the problem by 
> storing cache-related info in a Request attribute and generating the 
> headers later in a non-internal part of pipeline.
> 
> I also found out that (in the 2.1.7 release at least), pipelines called 
> via map:mount also eat HTTP response headers set in code , *including* 
> content-length which might have been set by the mounted pipeline.
> 
> There's a related discussion at 
> http://marc.theaimsgroup.com/?t=111746450000002&r=1&w=2, I think this 
> deserves further investigation, in my view map:mount should completely 
> delegate to the mounted sitemap, without filtering.
> 
What does this currently mean? If I set headers in a sub sitemap they
are ignored?

Carsten

-- 
Carsten Ziegeler - Open Source Group, S&N AG
http://www.s-und-n.de
http://www.osoco.org/weblogs/rael/