diff options
author | Yves Senn <yves.senn@gmail.com> | 2012-12-30 22:49:46 +0100 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2012-12-31 17:04:51 +0100 |
commit | 55a886b6e9bae1986a357626b08522a838aedb3e (patch) | |
tree | fd53e7bbfd00af4ff8fbc82be958de539c247d9e /actionpack/lib/action_controller | |
parent | d38c8caa48a732d41c7402a5e71deece4e313559 (diff) | |
download | rails-55a886b6e9bae1986a357626b08522a838aedb3e.tar.gz rails-55a886b6e9bae1986a357626b08522a838aedb3e.tar.bz2 rails-55a886b6e9bae1986a357626b08522a838aedb3e.zip |
backport #8662, charset should not be appended for `head` responses
1) Failure:
test_head_created_with_image_png_content_type(RenderTest) [test/controller/render_test.rb:1238]:
Expected: "image/png"
Actual: "image/png; charset=utf-8"
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r-- | actionpack/lib/action_controller/metal/head.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/actionpack/lib/action_controller/metal/head.rb b/actionpack/lib/action_controller/metal/head.rb index 671053566d..4c61bbd6dc 100644 --- a/actionpack/lib/action_controller/metal/head.rb +++ b/actionpack/lib/action_controller/metal/head.rb @@ -29,6 +29,7 @@ module ActionController self.status = status self.location = url_for(location) if location self.content_type = content_type || (Mime[formats.first] if formats) + self.response.charset = false if self.response self.response_body = " " end end |