aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authoryui-knk <spiketeika@gmail.com>2017-07-13 14:24:13 +0900
committeryui-knk <spiketeika@gmail.com>2017-07-13 14:24:13 +0900
commit7fa61b1550afab242353e5a093854f88569c4db7 (patch)
tree501193a3ef221f77bb5ae3d00c354c19778b9a90 /actionpack/lib
parent58f10a31b37e9bb6e975a71aa63744f318ee043d (diff)
downloadrails-7fa61b1550afab242353e5a093854f88569c4db7.tar.gz
rails-7fa61b1550afab242353e5a093854f88569c4db7.tar.bz2
rails-7fa61b1550afab242353e5a093854f88569c4db7.zip
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.
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_dispatch/http/response.rb2
1 files changed, 1 insertions, 1 deletions
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 @@ module ActionDispatch # :nodoc:
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