[Catalyst] Bug in Catalyst::finalize_headers()
Bernhard Graf
catalyst2 at augensalat.de
Sun May 6 17:52:18 GMT 2007
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.
> FYI, you can achieve your desired output streaming without using a
> forked process by just calling $c->write( ... ) with each chunk of
> data.
I know. That was my initial way. The code for the fork version seems
indeed easier, but again I'm not sure about portability (OSes, web
servers, threads, etc.).
--
Bernhard Graf
More information about the Catalyst
mailing list