This project is archived and is in readonly mode.
send_data should remove "Pragma" header if set to "no-cache"
Reported by paul | December 8th, 2009 @ 09:27 PM
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.
Comments and changes to this ticket
-
Rohit Arondekar October 8th, 2010 @ 12:10 PM
- 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.
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="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>