diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-01-13 13:29:49 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-01-13 13:29:49 +0000 |
commit | 96e54780b34ea6e8d8f972ff1f0b305aee44430c (patch) | |
tree | b0891fd894681dee07f29b61808c8349c619845c /actionpack/lib/action_controller | |
parent | 5f5b053ce879f9a01c04cfe0d6c0600b80979dfe (diff) | |
download | rails-96e54780b34ea6e8d8f972ff1f0b305aee44430c.tar.gz rails-96e54780b34ea6e8d8f972ff1f0b305aee44430c.tar.bz2 rails-96e54780b34ea6e8d8f972ff1f0b305aee44430c.zip |
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
Diffstat (limited to 'actionpack/lib/action_controller')
-rwxr-xr-x | actionpack/lib/action_controller/base.rb | 8 |
1 files changed, 4 insertions, 4 deletions
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( |