title: nginx mongo and gridfs bug
body: <p>I was trying to put the gridfs/nginx/mongo setup in place but I am getting some strange errors.</p>
  
  <p>I tried with nginx 0.8.53 and 0.8.54 and latest mongo 1.6.5 64bits on latest Ubuntu.
  Compiling with gridfs module worked well: <a href="https://github.com/mdirolf/nginx-gridfs" rel="nofollow">https://github.com/mdirolf/nginx-gridfs</a></p>
  
  <pre><code>server {
     listen xx.xx.xx.xx;
     server_name media.foo.com;
  
     access_log  /home/cloudy/log/nginx/media-access.log;
     error_log   /home/cloudy/log/nginx/media-error.log;
  
     location /gridfs/ {
         gridfs db_name;
         mongo 127.0.0.1:27017;
      }
  }
  </code></pre>
  
  <p>I get an empty response when I try to fetch a file: </p>
  
  <pre><code>curl -X GET -i 'http://media.foo.com/gridfs/4d4d526cea26b05041000015'
  curl: (52) Empty reply from server
  </code></pre>
  
  <p><strong>My error.log</strong></p>
  
  <pre><code>2011/02/05 15:28:50 [alert] 7112#0: *1 zero size buf in writer t:0 r:0 f:0 0000000000000000 0000000000000000-0000000000000000 0000000000000000 0-0, client: 80.11.52.189, server: media.uk.cloudy.fr, request: "GET /gridfs/4d4d526dea26b05041000016 HTTP/1.1", host: "media.foo.com"
  2011/02/05 15:28:52 [alert] 7112#0: *2 zero size buf in writer t:0 r:0 f:0 0000000000000000 0000000000000000-0000000000000000 0000000000000000 0-0, client: 80.11.52.189, server: media.uk.cloudy.fr, request: "GET /gridfs/4d4d526dea26b05041000016 HTTP/1.1", host: "media.foo.com"
  </code></pre>
  
  <p>Any suggestion is welcome :)</p>