From 96e54780b34ea6e8d8f972ff1f0b305aee44430c Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Thu, 13 Jan 2005 13:29:49 +0000 Subject: Fixed that send_file would "remember" all the files sent by adding to the headers again and again #458 [bitsweat] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@400 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_controller/base.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'actionpack/lib') diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb index 33e3014ee9..64dc79a24a 100755 --- a/actionpack/lib/action_controller/base.rb +++ b/actionpack/lib/action_controller/base.rb @@ -178,11 +178,11 @@ module ActionController #:nodoc: DEFAULT_RENDER_STATUS_CODE = "200 OK" DEFAULT_SEND_FILE_OPTIONS = { - :type => 'application/octet_stream', - :disposition => 'attachment', + :type => 'application/octet_stream'.freeze, + :disposition => 'attachment'.freeze, :stream => true, :buffer_size => 4096 - } + }.freeze # Determines whether the view has access to controller internals @request, @response, @session, and @template. # By default, it does. @@ -664,7 +664,7 @@ module ActionController #:nodoc: raise ArgumentError, ":#{arg} option required" if options[arg].nil? end - disposition = options[:disposition] || 'attachment' + disposition = options[:disposition].dup || 'attachment' disposition <<= %(; filename="#{options[:filename]}") if options[:filename] @headers.update( -- cgit v1.2.3