From 2346f5716f7b08168b74b29e0279d51c51557b08 Mon Sep 17 00:00:00 2001 From: Thomas Fuchs Date: Sun, 25 Sep 2005 06:53:42 +0000 Subject: Fix open/save dialog in IE not opening files send with send_file/send_data, #2279 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2325 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/test/controller/send_file_test.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'actionpack/test') diff --git a/actionpack/test/controller/send_file_test.rb b/actionpack/test/controller/send_file_test.rb index 0a1cc256d2..683d6eba60 100644 --- a/actionpack/test/controller/send_file_test.rb +++ b/actionpack/test/controller/send_file_test.rb @@ -85,5 +85,11 @@ class SendFileTest < Test::Unit::TestCase assert_equal 'type', h['Content-Type'] assert_equal 'disposition; filename="filename"', h['Content-Disposition'] assert_equal 'binary', h['Content-Transfer-Encoding'] + + # test overriding Cache-Control: no-cache header to fix IE open/save dialog + @controller.headers = { 'Cache-Control' => 'no-cache' } + @controller.send(:send_file_headers!, options) + h = @controller.headers + assert_equal 'private', h['Cache-Control'] end end -- cgit v1.2.3