mirror of https://github.com/rails/rails
Merge pull request #42609 from tadas-s/remove-ie6-7-8-specific-hack
Remove IE6-7-8 file download related hack/fix
This commit is contained in:
commit
6f1ff6fc65
|
@ -1,3 +1,9 @@
|
|||
* Remove IE6-7-8 file download related hack/fix from ActionController::DataStreaming module
|
||||
|
||||
Not hugely relevant due to age of those IE versions and it creates somewhat unexpected Cache-Control headers.
|
||||
|
||||
*Tadas Sasnauskas*
|
||||
|
||||
* Configuration setting to skip logging an uncaught exception backtrace when the exception is
|
||||
present in `rescued_responses`.
|
||||
|
||||
|
|
|
@ -138,14 +138,6 @@ module ActionController #:nodoc:
|
|||
end
|
||||
|
||||
headers["Content-Transfer-Encoding"] = "binary"
|
||||
|
||||
# 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
|
||||
response.cache_control[:public] ||= false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -146,7 +146,6 @@ class SendFileTest < ActionController::TestCase
|
|||
assert_equal "image/png", response.content_type
|
||||
assert_equal %(disposition; filename="filename"; filename*=UTF-8''filename), response.get_header("Content-Disposition")
|
||||
assert_equal "binary", response.get_header("Content-Transfer-Encoding")
|
||||
assert_equal "private", response.get_header("Cache-Control")
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue