From 7fa61b1550afab242353e5a093854f88569c4db7 Mon Sep 17 00:00:00 2001 From: yui-knk Date: Thu, 13 Jul 2017 14:24:13 +0900 Subject: [PATCH] Use `#set_content_type` instead of `#set_header` By this commit, `#set_header` is called only via `#set_content_type`. This commit makes the role of `#charset=` more clear. --- actionpack/lib/action_dispatch/http/response.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actionpack/lib/action_dispatch/http/response.rb b/actionpack/lib/action_dispatch/http/response.rb index eab663e2e0..9b510d4ab9 100644 --- a/actionpack/lib/action_dispatch/http/response.rb +++ b/actionpack/lib/action_dispatch/http/response.rb @@ -259,7 +259,7 @@ def sending_file=(v) def charset=(charset) header_info = parsed_content_type_header if false == charset - set_header CONTENT_TYPE, header_info.mime_type + set_content_type header_info.mime_type, nil else content_type = header_info.mime_type set_content_type content_type, charset || self.class.default_charset -- GitLab