Rails3: Empty (0 byte) downloads using send_data/send_file

Dienstag, 12. Juli 2011, 09:12 Uhr | roberto@vasquez-angel.de |

If you get empty downloads served from a rails application on passenger, the culprit might be following line in your Rails.root/environments/production.rb:

config.action_dispatch.x_sendfile_header = "X-Sendfile"

Remove it, and it should work.