Skip to content

Commit 6f1ff6f

Browse files
Merge pull request rails#42609 from tadas-s/remove-ie6-7-8-specific-hack
Remove IE6-7-8 file download related hack/fix
2 parents 1aa9115 + d08035b commit 6f1ff6f

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

actionpack/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
* Remove IE6-7-8 file download related hack/fix from ActionController::DataStreaming module
2+
3+
Not hugely relevant due to age of those IE versions and it creates somewhat unexpected Cache-Control headers.
4+
5+
*Tadas Sasnauskas*
6+
17
* Configuration setting to skip logging an uncaught exception backtrace when the exception is
28
present in `rescued_responses`.
39

actionpack/lib/action_controller/metal/data_streaming.rb

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -138,14 +138,6 @@ def send_file_headers!(options)
138138
end
139139

140140
headers["Content-Transfer-Encoding"] = "binary"
141-
142-
# Fix a problem with IE 6.0 on opening downloaded files:
143-
# If Cache-Control: no-cache is set (which Rails does by default),
144-
# IE removes the file it just downloaded from its cache immediately
145-
# after it displays the "open/save" dialog, which means that if you
146-
# hit "open" the file isn't there anymore when the application that
147-
# is called for handling the download is run, so let's workaround that
148-
response.cache_control[:public] ||= false
149141
end
150142
end
151143
end

actionpack/test/controller/send_file_test.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,6 @@ def test_send_file_headers_bang
146146
assert_equal "image/png", response.content_type
147147
assert_equal %(disposition; filename="filename"; filename*=UTF-8''filename), response.get_header("Content-Disposition")
148148
assert_equal "binary", response.get_header("Content-Transfer-Encoding")
149-
assert_equal "private", response.get_header("Cache-Control")
150149
end
151150
end
152151

0 commit comments

Comments
 (0)