about summary refs log tree commit homepage
path: root/lib/yahns/stream_file.rb
DateCommit message (Collapse)
2016-01-02copyright updates for 2016
Using the 'update-copyright' script from gnulib[1]: git ls-files | UPDATE_COPYRIGHT_HOLDER='all contributors' \ UPDATE_COPYRIGHT_USE_INTERVALS=2 \ xargs /path/to/gnulib/build-aux/update-copyright We're also switching to 'GPL-3.0+' as recommended by SPDX to be consistent with our gemspec and other metadata (as opposed to the longer but equivalent "GPLv3 or later"). [1] git://git.savannah.gnu.org/gnulib.git
2016-01-02enable frozen_string_literal for Ruby 2.3+
There are likely yet-to-be-discovered bugs in here. Also, keeping explicit #freeze calls for 2.2 users, since most users have not migrated to 2.3, yet.
2015-10-13copyright updates
Future updates may use the update-copyright script in gnulib: git ls-files | UPDATE_COPYRIGHT_HOLDER='all contributors' \ UPDATE_COPYRIGHT_USE_INTERVALS=2 \ xargs /path/to/gnulib/build-aux/update-copyright
2015-01-24update comments about wbuf_close return values
The state management has evolved slightly over time, so update the comments to reflect that.
2015-01-23reduce File::Stat object allocations
Since we only support 1.9.3+, io.stat.size may be simplified to io.size to reduce allocations of File::Stat objects.
2013-11-07fdmap: simplify IO expiry interface
The first argument of the old __expire_for method was completely unused in all but one invocation of it, so it is not worth it. This also simplifies the code a bit too.
2013-11-02stream_file: only close FDs we opened ourselves
We must not directly close descriptors allocated by applications themselves. The only way we may close them is to issue body.close on the response body. A simple comparison we used before may not work because Rack response bodies may be wrapped by middleware, so we use a private subclass of File.
2013-10-26StreamFile and TmpIO attempt expiry on EMFILE/ENFILE
This should help prevent some errors from popping up. Obviously, we cannot spend too long doing this inside a worker thread.
2013-10-18initial commit