[Mongrel] send_file and ZIP files
jeremy at bitsweat.net
Tue Feb 27 08:25:47 EST 2007
On 2/27/07, Niall O Broin <niall at makalumedia.com> wrote:
> I have an application which uses send_file to send a ZIP file to the
> client. This works nicely when it's run on our development OS-X
> boxes, using mongrel from script/server, but on our production
> server, using mongrel behind Apache 2.2. with mod_proxy_balancer, the
> client gets 1 byte delivered :-(
Niall, what is the error logged when you get a 500 status in production?
In any case, your best bet is to use the X-Sendfile header to tell Apache
which file path to send. Streaming files from Rails means your Mongrel
process is tied up for the duration -- no good. See
http://wiki.rubyonrails.org/rails/pages/HowtoSendFilesFast for more on how
to use Apache's mod_xsendfile.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mongrel-users