From b8c2f3c7692867dfd444d60efb18570ad0fba236 Mon Sep 17 00:00:00 2001 From: Yves Senn Date: Sun, 30 Dec 2012 22:49:46 +0100 Subject: 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" --- actionpack/lib/action_controller/metal/head.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'actionpack/lib/action_controller/metal/head.rb') 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') -- cgit v1.2.3