Send_file doesn't work with Apache?

Hi,

I’ve been using send_file in my Rails application with
WEBrick happily to send files of various sizes and
kinds.

The same code fails to send anything but a 500 error
when run under Apache, and a log file message
“warning: syswrite for buffered IO”.

Looking back through the mailing list archives I see that
there have been send_file bugs in the past. Can some
knowledgeable person tell me if these problems are
still unfixed for Rails application using Apache?

Cheers,

Stu

Stuart Hungerford wrote:

Hi,

I’ve been using send_file in my Rails application with
WEBrick happily to send files of various sizes and
kinds.
The same code fails to send anything but a 500 error
when run under Apache, and a log file message
“warning: syswrite for buffered IO”.

Has anybody discovered a solution for this exact bug?
I really need the send_file

Best regards,
Daniel

http://blog.teksol.info/articles/2005/12/26/send-file-breakage-using-scgi-apache

Add the
:stream => false
parameter and it will work.

=)

Daniel

Stuart,

Did you get this resolved at all? It looks like I’m hitting the same
issue.

Cheers,
Nicholas