This project is archived and is in readonly mode.
Changeset [5e2bd08023344f3fd4675e80203a10967ffe9000] by Carlhuda
Revision 5e2bd08023344f3fd4675e80203a10967ffe9000,
committed by Carlhuda
· February 24th, 2010 @ 01:06 AM
Makes send_file work again by deferring to Rack::Sendfile.
- Add the Rack::Sendfile middleware
- Make the header to use configurable via config.action_dispatch.x_sendfile_header (default to "X-Sendfile").
- Add Railties tests to confirm that these work
- Remove the :stream, :buffer_size, and :x_senfile default options to send_file
- Change the log subscriber to always say "Sent file"
- Add deprecation warnings for options that are now no-ops
Note that servers can configure this by setting X-Sendfile-Type.
Hosting companies and those creating packages of servers specially
designed for Rails applications are encouraged to specify this
header so that this can work transparently.
http://github.com/rails/rails/commit/5e2bd08023344f3fd4675e80203a10...
7 changed files
-
M
actionpack/lib/action_controller/metal/streaming.rb -
M
actionpack/lib/action_controller/railties/log_subscriber.rb -
M
actionpack/lib/action_dispatch/railtie.rb -
M
actionpack/test/controller/log_subscriber_test.rb -
M
actionpack/test/controller/send_file_test.rb -
M
railties/lib/rails/configuration.rb -
M
railties/test/application/configuration_test.rb