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 16:08:36 +0100 |
commit | b8c2f3c7692867dfd444d60efb18570ad0fba236 (patch) | |
tree | 378ec5d160a0fdaf2d75cb8f372061d88813ba6b /actionpack/lib/action_controller | |
parent | 1304298bd921976b8390a8d90bb533fd493e2867 (diff) | |
download | rails-b8c2f3c7692867dfd444d60efb18570ad0fba236.tar.gz rails-b8c2f3c7692867dfd444d60efb18570ad0fba236.tar.bz2 rails-b8c2f3c7692867dfd444d60efb18570ad0fba236.zip |
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 bbace49fd9..8237db15ca 100644 --- a/actionpack/lib/action_controller/metal/head.rb +++ b/actionpack/lib/action_controller/metal/head.rb @@ -31,6 +31,7 @@ module ActionController if include_content?(self.status) self.content_type = content_type || (Mime[formats.first] if formats) + self.response.charset = false if self.response self.response_body = " " else headers.delete('Content-Type') |