aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/metal/streaming.rb
Commit message (Collapse)AuthorAgeFilesLines
* Makes send_file work again by deferring to Rack::Sendfile. Carlhuda2010-02-231-38/+19
| | | | | | | | | | * 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.
* Fix streaming by having it create a File object, which can be handled by ↵Carlhuda2010-02-231-14/+6
| | | | Rack servers as appropriate
* Add subscriber for ActionPack and move all logging inside it.José Valim2010-01-131-4/+0
|
* Rename the RenderingController module to just plain RenderingDavid Heinemeier Hansson2009-12-201-1/+1
|
* String#bytesize is not needed for Ruby >= 1.8.7Xavier Noria2009-11-091-2/+0
|
* Got overhead down from 127 to 85. All tests pass:Yehuda Katz2009-08-111-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | * Tentatively replaced HeaderHash with SimpleHeaderHash, which does not preserve case but does handle converting Arrays to Strings in to_hash. This requires further discussion. * Moved default_charset to ActionDispatch::Response to avoid having to hop over to ActionController. Ideally, this would be a constant on AD::Response, but some tests expect to be able to change it dynamically and I didn't want to change them yet. * Completely override #initialize from Rack::Response. Previously, it was creating a HeaderHash, and then we were creating an entirely new one. There is no way to call super without incurring the overhead of creating a HeaderHash. * Override #write from Rack::Response. Its implementation tracks Content-Length, and doing so adds additional overhead that could be mooted if other middleware changes the body. It is more efficiently done at the top-level server. * Change sending_file to an instance_variable instead of header inspection. In general, if a state is important, it should be set as a property of the response not reconstructed later. * Set the Etag to @body instead of .body. AS::Cache.expand_cache_key handles Arrays fine, and it's more efficient to let it handle the body parts, since it is not forced to create a joined String. * If we detect the default cache control case, just set it, rather than setting the constituent parts and then running the normal (expensive) code to generate the string.
* Renamed presenter to renderer, added some documentation and defined its API.José Valim2009-08-071-1/+1
|
* Rename /base to /metal and make base.rb and metal.rb top-level to reflect ↵Yehuda Katz2009-08-061-0/+187
their module locations