<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.12.1">
</HEAD>
<BODY>
hello,<BR>
<BR>
Sorry for my english...<BR>
<BR>
I have a Ruby on Rails site in production with Nginx 0.5.15 and 2 mongrel clusters. All work fine except the file download (streaming) and i don't know where does the problem come from (mongrel ? nginx ? rails ?)<BR>
<BR>
<BR>
In my view, I have the link : link_to &quot;my_file&quot;, <BR>
{:controller=&gt;&quot;environnement&quot;, :action=&gt;&quot;download&quot;, :id=&gt;&quot;my_file&quot;} <BR>
<BR>
<BR>
In the action of my controller environnement, I use the send_file method :<BR>
&quot;public/my_file.pdf&quot;, :type =&gt; 'application/pdf' <BR>
<BR>
<BR>
In my browser, when I click on the download link pointing to the action, the browser window says that it is starting the download and after 30s it says<BR>
that the download is finished. <BR>
<BR>
<BR>
-&gt; there is no progress bar in the download window of the browser. <BR>
<BR>
-&gt; when the file is downloaded, the format isn't correct and the size of it is not what it should be<BR>
<BR>
-&gt; it's work localy on my desktop in development mode<BR>
<BR>
-&gt; it works if i use the direct link without the send_file method : http://www.my_site.com/my_file.pdf<BR>
<BR>
<BR>
Here the logs from production.log :<BR>
<BR>
<BR>
Processing EnvironnementController#download (for 82.247.51.xxx at <BR>
2007-07-31 17:27:03) [GET] <BR>
&nbsp; Session ID: 32b17304de1110d9aeebb602439fe056 <BR>
&nbsp; Parameters: {&quot;action&quot;=&gt;&quot;download&quot;, &quot;id&quot;=&gt;&quot;my_file&quot;, <BR>
&quot;controller&quot;=&gt;&quot;environnement&quot;} <BR>
Completed in 0.00057 (1754 reqs/sec) | Rendering: 0.00006 (10%) | DB: <BR>
0.00000 (0%) | 200 OK <BR>
[<A HREF="http://www.mon_site.com/environnement/telecharger/mon_fichier">http://www.mon_site.com/environnement/download/my_file</A>] <BR>
Streaming file public/my_file.pdf <BR>
<BR>
<BR>
an idea ?<BR>
<BR>
<BR>
J&#233;r&#233;my. <BR>
<BR>
<BR>
<BR>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
<BR>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>