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

_______________________________________________
List: [email protected]
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to