about summary refs log tree commit homepage
path: root/lib/rainbows/sendfile.rb
DateCommit message (Collapse)
2011-02-06kill some unnecessary &block usage
We were needlessly allocating objects even when using yield.
2011-01-07more consistent use/avoidance of HeaderHash
Rack::Utils::HeaderHash is still expensive, so avoid forcing it on users since we can assume app/library authors use normally-cased HTTP headers.
2010-07-19no need to pass 'rb' as File.open flags
IO#read always returns a binary string buffer if passed an explicit length to read, and we always do that. This is a small garbage reduction.
2010-07-19sendfile middleware: various style cleanups
Favor constants over literal strings for a small garbage reduction.
2010-07-10doc: avoid documenting internals on RDoc website
Since we suck at building websites, we just rely on RDoc as a website builder. And since Rainbows! is an application server (and not a programming library), our internal API should be of little interest to end users. Anybody interested in Rainbows! (or any other project) internals should be reading the source.
2010-07-04refactor response body handling for sendfile(2)
This hopefully allows the "sendfile" gem to be required anywhere in the Rainbows!/Unicorn config file, and not have to be required via RUBYOPT or the '-r' command-line switch. We also modularize HttpResponse and avoids singleton methods in the response path. This (hopefully) makes it easier for individual concurrency models to share code and override individual methods.
2010-06-24sendfile: update docs for Rack::Sendfile
Rack::Contrib::Sendfile moved into Rack in December 2009.
2010-06-04sendfile: update RDoc for this middleware.
2010-06-03add Rainbows::Sendfile middleware
This lets most concurrency models understand and process X-Sendfile efficiently with IO.copy_stream under Ruby 1.9. EventMachine can take advantage of this middleware under both Ruby 1.8 and Ruby 1.9.