[Catalyst] Bug in Catalyst::finalize_headers()

Andy Grundman andy at hybridized.org
Sun May 6 18:04:14 GMT 2007


On May 6, 2007, at 12:52 PM, Bernhard Graf wrote:

> On Sunday 06 May 2007 16:58, Andy Grundman wrote:
>
>> I've checked in a simpler patch that just checks that $stat->size > 0
>> before setting the Content-Length.
>
> I must admit that I am not sure if stat size of a pipe is always 0  
> - at
> least I wouldn't rely on it. And of course a regular empty file has 0
> bytes too.
>
> On the other hand I don't know how portable this Fcntl stuff is.

That's why I opted for the easier solution, if $stat->size > 0 it's  
should be safe to set Content-Length to that value.





More information about the Catalyst mailing list