Vadim Gritsenko wrote:
> 
> [EMAIL PROTECTED] wrote:
> 
> >Wrong HTTP Content Length for Reader when "show-time"
> >  
> >
> ...
> 
> >It is not possible to fix this problem as once the content 
> length is written it 
> >can't be changed later on. So if e.g. the content comes from the 
> cache, the 
> >cache sets the content length and this can't be overwritten 
> anymore. These are 
> >the times, where it goes wrong - the same applies to the reader.
> >But as "show-time" is only a debugging feature, this is not a 
> real problem, so 
> >we set it to "WONTFIX".
> >  
> >
> 
> There is a way to fix it: Wrap response, and when content length is set 
> add a fixed amount (equal to max length of time string) to it to reserve 
> space for the time string. Once time string is written, add some padding 
> so actual content length matches advertised.
> 
> 
> But it might not worth the trouble adding all this complexity just to 
> implement some debug feature
> 
Yes, I thought about this as well - but as you said, imho it's not worth
the effort. And there is another problem, the time is only written for 
html pages, but it might be that you don't know if it's an html page
when the content length is set and you can only return "-1" as the
length.

Carsten

Reply via email to