Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

send_data should remove "Pragma" header if set to "no-cache"

#3553

In the streaming mix-in there is code to fix an issue with IE browsers when downloading a file:

# Fix a problem with IE 6.0 on opening downloaded files:
# If Cache-Control: no-cache is set (which Rails does by default),
# IE removes the file it just downloaded from its cache immediately
# after it displays the "open/save" dialog, which means that if you
# hit "open" the file isn't there anymore when the application that
# is called for handling the download is run, so let's workaround that
headers['Cache-Control'] = 'private' if headers['Cache-Control'] == 'no-cache'

It should also remove the "Pragma" header if headers['Pragma'] == 'no-cache' because the line above will not fix the issue if the Pragma header is set.

Edited by Rohit Arondekar for formatting.

Reported by paul · December 8th, 2009 @ 09:27 PM

State: stale
Milestone: none
Assigned to: nobody
Importance: Low

Activity

  1. Rohit Arondekar
    Rohit Arondekar
    • State changed from new to stale
    • Importance changed from to Low

    Marking ticket as stale. If this is still an issue please leave a comment with suggested changes, creating a patch with tests, rebasing an existing patch or just confirming the issue on a latest release or master/branches.

    October 8th, 2010 @ 12:10 PM

  2. bingbing