Date | Commit message (Collapse) |
|
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")
|
|
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]
|
|
No need to allocate a proc every time when we can just
yield much more efficiently.
|
|
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.
|