Skip to content


Subversion checkout URL

You can clone with
Download ZIP


`:disposition =>` in `#send_file` and `#send_data` #2973

yfeldblum opened this Issue · 2 comments

4 participants


ActionController::DataStreaming#send_file and ActionController::DataStreaming#send_data should not require the :disposition => option.

The reason is that the Content-Disposition HTTP response header is optional. There are many cases where we might want to deliver bytes in the response using the convenience of #send_file or #send_data, but where the Content-Disposition header is not useful. One example would be HTML pages that are pre-generated and stored in a database or distributed filesystem, and where we would like to send them down to the browser from the database (with #send_data) or from the filesystem (with #send_file)


I also thinks that it should be optional.

@josevalim What do you think?


Given it's considered optional, seems to make sense to not require it by default.

@yfeldblum perhaps you could work on a patch for this? That'd be great :)

@josevalim josevalim closed this in 9f64f20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.