about summary refs log tree commit homepage
path: root/lib/rainbows/sync_close.rb
DateCommit message (Collapse)
2015-10-14response: convert source arg to path before IO.copy_stream
This will allow us use the sendfile syscall under Linux on Ruby which favor #read/#readpartial methods for non-IO objects. This also allows us to revert changes made in commit db790ff3531acdfa23ab290998bba29360a6782b ("sync_close: This fix breakage from Ruby-trunk r50118")
2015-09-14sync_close: This fix breakage from Ruby-trunk r50118
By providing read+readpartial methods IO.copy_stream behaves slightly differently when operating on non-IO-subclassed objects nowadays. Ref: > * io.c (copy_stream_body): use the arguments without conversion if > having read, readpartial, and write methods, than conversion by > to_path method. [ruby-core:68676] [Bug #11015]
2011-02-06minimize &block usage for yield
No need to allocate a proc every time when we can just yield much more efficiently.
2010-12-28several response body#close fixes
Some middlewares require the Rack env to be preserved all the way through to close, so we'll ensure all request models preserve it. We also need to better response body wrappers/proxies always get fired properly when returning. IO.copy_stream and "sendfile" gem users could hit cases where wrappers did not fire properly.