about summary refs log tree commit homepage
path: root/lib/rainbows/stream_file.rb
DateCommit message (Collapse)
2011-04-26stream_file: hide internals
No need to expose things that don't need exposing.
2011-03-10switch from IO#sendfile_nonblock to IO#trysendfile
IO#trysendfile does not raise exceptions for common EAGAIN errors, making it far less expensive to use with the following concurrency models: * Coolio * CoolioFiberSpawn * Revactor * FiberSpawn * FiberPool This requires the new sendfile 1.1.0 RubyGem and removes support for the sendfile 1.0.0. All sendfile users must upgrade or be left without sendfile(2) support. IO#sendfile behaves the same if you're using a multi-threaded concurrency option, but we don't detect nor use it unless IO#trysendfile exists.
2010-07-22enable Range: responses for static files for most models
The FileStreamer class of EventMachine (and by extension NeverBlock) unfortunately doesn't handle this. It's possible to do with Revactor (since it uses Rev under the covers), but we'll support what we can easily for now.
2010-07-19ensure file response bodies are properly closed
Middlewares like Clogger may wrap Rack::File responses with another body that responds to to_path and still rely on #close to trigger an action (writing out the log file).
2010-07-08stream_file: split this out from rev/sendfile
Other concurrency models will eventually be able to use it, too.