From a960fc703245df735787a3fcc05eb66701e150ba Mon Sep 17 00:00:00 2001 From: Jon Moss Date: Mon, 29 Aug 2016 17:34:39 -0400 Subject: Allow `send_file` to declare a charset Removed my patch in favor of @tenderlove's less invasive approach. [Aaron Patterson & Jon Moss] --- actionpack/lib/action_controller/metal/data_streaming.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'actionpack/lib/action_controller/metal') diff --git a/actionpack/lib/action_controller/metal/data_streaming.rb b/actionpack/lib/action_controller/metal/data_streaming.rb index b598dd4d77..6a1acb64f7 100644 --- a/actionpack/lib/action_controller/metal/data_streaming.rb +++ b/actionpack/lib/action_controller/metal/data_streaming.rb @@ -70,6 +70,7 @@ module ActionController #:nodoc: send_file_headers! options self.status = options[:status] || 200 + self.content_type = options[:type] if options.key?(:type) self.content_type = options[:content_type] if options.key?(:content_type) response.send_file path end -- cgit v1.2.3