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 13:32:46 GMT
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?

I guess you are absolutely right. The Response object in the case of an 
internal request should be a WrappedResponse object. I don't think 
ResourceReader should deal with Environment directly.

There still remains the question whether the ResourceReader should be 
setting the Content-Length itself though. In fact setting response 
headers while generating a pipeline may be a bad idea in general 
depending on the type of header. When the processing pipeline 
implementation is caching there is no way to reproduce the original 
response and hence the cached response is different from the original 
generated response.


View raw message