several response body#close fixes
commit3495d59763e6159975debf32728dc53fc41c5ea1
authorEric Wong <normalperson@yhbt.net>
Tue, 28 Dec 2010 04:25:39 +0000 (27 20:25 -0800)
committerEric Wong <normalperson@yhbt.net>
Wed, 29 Dec 2010 01:12:28 +0000 (28 17:12 -0800)
tree949415250af66075cc9ca98040a85ddc2ad84380
parent53afe0b23fc67c5b25541cddbd68f905c649e756
several 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.
13 files changed:
lib/rainbows.rb
lib/rainbows/event_machine/client.rb
lib/rainbows/event_machine/response_pipe.rb
lib/rainbows/fiber/body.rb
lib/rainbows/response/body.rb
lib/rainbows/rev/client.rb
lib/rainbows/rev/deferred_response.rb
lib/rainbows/revactor/body.rb
lib/rainbows/sync_close.rb [new file with mode: 0644]
lib/rainbows/writer_thread_pool.rb
lib/rainbows/writer_thread_spawn.rb
t/close-has-env.ru [new file with mode: 0644]
t/t0050-response-body-close-has-env.sh [new file with mode: 0644]