Skip to content

Instantly share code, notes, and snippets.

@psy-q
Created February 17, 2012 08:33
Show Gist options
  • Select an option

  • Save psy-q/1851834 to your computer and use it in GitHub Desktop.

Select an option

Save psy-q/1851834 to your computer and use it in GitHub Desktop.
Rack::Sendfile returns the whole body instead of just writing the X-Sendfile header
# This triggers said error, but only in our Rails 3.1.3 application, not in a blank Rails 3.1.3 application!
class DownloadController < ApplicationController
def download
send_file("/tmp/test.txt")
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment