File tree Expand file tree Collapse file tree 3 files changed +6
-9
lines changed
lib/action_controller/metal Expand file tree Collapse file tree 3 files changed +6
-9
lines changed Original file line number Diff line number Diff line change
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
+
1
7
* Configuration setting to skip logging an uncaught exception backtrace when the exception is
2
8
present in ` rescued_responses ` .
3
9
Original file line number Diff line number Diff line change @@ -138,14 +138,6 @@ def send_file_headers!(options)
138
138
end
139
139
140
140
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
149
141
end
150
142
end
151
143
end
Original file line number Diff line number Diff line change @@ -146,7 +146,6 @@ def test_send_file_headers_bang
146
146
assert_equal "image/png" , response . content_type
147
147
assert_equal %(disposition; filename="filename"; filename*=UTF-8''filename) , response . get_header ( "Content-Disposition" )
148
148
assert_equal "binary" , response . get_header ( "Content-Transfer-Encoding" )
149
- assert_equal "private" , response . get_header ( "Cache-Control" )
150
149
end
151
150
end
152
151
You can’t perform that action at this time.
0 commit comments