diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2017-08-02 09:52:14 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-02 09:52:14 -0500 |
commit | c6974229d018b73f70e38ca8c8862473870d0274 (patch) | |
tree | 51a95d540eeece7a77c44166caa1ebf120027eba /actionpack/lib | |
parent | 4c3c4182a7bde6a736c0b489276da9f77fc430f2 (diff) | |
parent | 869cb93de12141425b73f43e93f6e3730147b0ed (diff) | |
download | rails-c6974229d018b73f70e38ca8c8862473870d0274.tar.gz rails-c6974229d018b73f70e38ca8c8862473870d0274.tar.bz2 rails-c6974229d018b73f70e38ca8c8862473870d0274.zip |
Merge branch 'master' into active-storage-import
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_dispatch/http/response.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/actionpack/lib/action_dispatch/http/response.rb b/actionpack/lib/action_dispatch/http/response.rb index 84b2ef253d..b314dbecfe 100644 --- a/actionpack/lib/action_dispatch/http/response.rb +++ b/actionpack/lib/action_dispatch/http/response.rb @@ -259,11 +259,10 @@ module ActionDispatch # :nodoc: # response.charset = 'utf-16' # => 'utf-16' # response.charset = nil # => 'utf-8' def charset=(charset) - header_info = parsed_content_type_header + content_type = parsed_content_type_header.mime_type if false == charset - set_header CONTENT_TYPE, header_info.mime_type + set_content_type content_type, nil else - content_type = header_info.mime_type set_content_type content_type, charset || self.class.default_charset end end |