diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2006-11-25 19:29:10 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2006-11-25 19:29:10 +0000 |
commit | 396b3f2befe5d75ac04e732eae195dc6d9d20201 (patch) | |
tree | d1512f26312cd79306c34ad2e563658476484544 /actionpack/test/controller | |
parent | cf248eae1f32811400261e2e35d863cb1a549523 (diff) | |
download | rails-396b3f2befe5d75ac04e732eae195dc6d9d20201.tar.gz rails-396b3f2befe5d75ac04e732eae195dc6d9d20201.tar.bz2 rails-396b3f2befe5d75ac04e732eae195dc6d9d20201.zip |
Dont set default charset if the response is sending a file. Closes #6689 [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5626 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r-- | actionpack/test/controller/send_file_test.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/actionpack/test/controller/send_file_test.rb b/actionpack/test/controller/send_file_test.rb index a4617cbf5a..83590fd73e 100644 --- a/actionpack/test/controller/send_file_test.rb +++ b/actionpack/test/controller/send_file_test.rb @@ -63,6 +63,14 @@ class SendFileTest < Test::Unit::TestCase assert_equal file_data, response.body end + def test_headers_after_send_shouldnt_include_charset + response = process('data') + assert_equal "application/octet-stream", response.headers["Content-Type"] + + response = process('file') + assert_equal "application/octet-stream", response.headers["Content-Type"] + end + # Test that send_file_headers! is setting the correct HTTP headers. def test_send_file_headers! options = { |