diff options
Diffstat (limited to 'actionpack/lib/action_controller/base.rb')
-rwxr-xr-x | actionpack/lib/action_controller/base.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb index 9b4b729e8d..288e6d2912 100755 --- a/actionpack/lib/action_controller/base.rb +++ b/actionpack/lib/action_controller/base.rb @@ -1087,7 +1087,11 @@ module ActionController #:nodoc: def assign_default_content_type_and_charset response.content_type ||= Mime::HTML - response.charset ||= self.class.default_charset + response.charset ||= self.class.default_charset unless sending_file? + end + + def sending_file? + response.headers["Content-Transfer-Encoding"] == "binary" end def action_methods |