This project is archived and is in readonly mode.

#1120 ✓invalid
Paul Barry

Allow option of omitting Content-Disposition from response header when using send_file

Reported by Paul Barry | September 26th, 2008 @ 05:45 PM | in 2.x

There cases where I am streaming a file through rails, but I don't know whether the content disposition should be inline or attachment, so I'd like to just leave it up to the browser to decide. This patch allows you to do send_file(:disposition => false) and have the Content-Disposition header omitted from the response.

Comments and changes to this ticket

  • Pratik

    Pratik January 5th, 2009 @ 06:27 PM

    • State changed from “new” to “incomplete”
    • Assigned user set to “Pratik”

    Is this allowed by HTTP protocol ? Quoting rfc will surely help :)

    Also, the patch is missing tests.


  • Paul Barry

    Paul Barry January 5th, 2009 @ 10:41 PM

    It doesn't appear that this is necessary. I originally though the browser was doing different things when the content-disposition header wasn't present vs. when the content-disposition header was set to inline, but after more testing, it appears to behave the same both ways. Sorry for the confusion.

  • Pratik

    Pratik January 5th, 2009 @ 10:44 PM

    • State changed from “incomplete” to “invalid”

    Ok great.

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>

People watching this ticket