Files | Admin

Notes:

Release Name: 4.5.0

Notes:
Rainbows! 4.5.0 - hijacking support

Rainbows! is an HTTP server for sleepy Rack applications.  It is based on
Unicorn, but designed to handle applications that expect long
request/response times and/or slow clients.

* http://rainbows.rubyforge.org/
* rainbows-talk@rubyforge.org
* git://bogomips.org/rainbows.git
* http://rainbows.rubyforge.org/NEWS.atom.xml

Changes:

This release adds hijacking support for Rack 1.5.x users.
See Rack documentation for more information about hijacking.
Lin Jen-Shin also provided the -N/--no-default-middleware option.
Minor packaging cleanups and new HACKING document.

There are also some corner-case bugfixes for *Epoll* users
(sleepy_penguin, these bugs do not affect EM or Cool.io users)
and test suite portability improvements.



Changes: .document | 1 + .gitignore | 1 + Documentation/rainbows.1.txt | 12 +++-- GIT-VERSION-GEN | 69 +++++++++++++------------- GNUmakefile | 6 ++- HACKING | 72 ++++++++++++++++++++++++++++ bin/rainbows | 5 ++ lib/rainbows/const.rb | 6 +-- lib/rainbows/coolio/client.rb | 24 +++++++--- lib/rainbows/coolio/thread_client.rb | 2 + lib/rainbows/epoll/client.rb | 47 +++++++++++++----- lib/rainbows/ev_core.rb | 9 ++-- lib/rainbows/event_machine/client.rb | 13 +++-- lib/rainbows/process_client.rb | 10 ++-- lib/rainbows/response.rb | 72 +++++++++++++++++++++------- lib/rainbows/revactor/client/methods.rb | 2 +- lib/rainbows/stream_response_epoll.rb | 49 +++++++++++++------ lib/rainbows/stream_response_epoll/client.rb | 14 ++++-- lib/rainbows/writer_thread_pool/client.rb | 2 + lib/rainbows/xepoll/client.rb | 3 -- lib/rainbows/xepoll_thread_pool/client.rb | 2 +- lib/rainbows/xepoll_thread_spawn/client.rb | 2 +- rainbows.gemspec | 9 ++-- t/GNUmakefile | 13 +++-- t/bin/utee | 12 ----- t/byte-range-common.sh | 2 +- t/hijack.ru | 56 ++++++++++++++++++++++ t/t0000-simple-http.sh | 18 +++---- t/t0001-unix-http.sh | 16 +++---- t/t0003-reopen-logs.sh | 16 +++---- t/t0004-heartbeat-timeout.sh | 6 +-- t/t0005-large-file-response.sh | 2 +- t/t0010-keepalive-timeout-effective.sh | 4 +- t/t0011-close-on-exec-set.sh | 4 +- t/t0017-keepalive-timeout-zero.sh | 4 +- t/t0024-pipelined-sendfile-response.sh | 4 +- t/t0027-nil-copy_stream.sh | 2 +- t/t0030-fast-pipe-response.sh | 2 +- t/t0034-pipelined-pipe-response.sh | 4 +- t/t0035-kgio-pipe-response.sh | 2 +- t/t0040-keepalive_requests-setting.sh | 8 ++-- t/t0043-quit-keepalive-disconnect.sh | 6 +-- t/t0044-autopush.sh | 4 +- t/t0045-client_max_header_size.sh | 4 +- t/t0100-rack-input-hammer-chunked.sh | 8 ++-- t/t0100-rack-input-hammer-content-length.sh | 8 ++-- t/t0106-rack-input-keepalive.sh | 12 ++--- t/t0200-async-response.sh | 10 ++-- t/t0202-async-response-one-oh.sh | 10 ++-- t/t0300-async_sinatra.sh | 10 ++-- t/t0400-em-async-app.sh | 4 +- t/t0401-em-async-tailer.sh | 4 +- t/t0402-async-keepalive.sh | 46 +++++++++--------- t/t0500-cramp-streaming.sh | 6 +-- t/t0600-rack-fiber_pool.sh | 2 +- t/t0700-app-deferred.sh | 4 +- t/t0800-rack-hijack.sh | 27 +++++++++++ t/t9000-rack-app-pool.sh | 6 +-- t/t9001-sendfile-to-path.sh | 2 +- t/t9100-thread-timeout.sh | 2 +- t/t9101-thread-timeout-threshold.sh | 2 +- t/test-lib.sh | 15 ++++++ t/test_isolate.rb | 7 +-- 63 files changed, 548 insertions(+), 258 deletions(-) commit 4be3e386118969345ee5c94049efa7faae338e4d Author: Eric Wong Date: Wed Feb 27 10:25:21 2013 +0000 Rainbows! 4.5.0 - hijacking support This release adds hijacking support for Rack 1.5.x users. See Rack documentation for more information about hijacking. Lin Jen-Shin also provided the -N/--no-default-middleware option. Minor packaging cleanups and new HACKING document. There are also some corner-case bugfixes for *Epoll* users (sleepy_penguin, these bugs do not affect EM or Cool.io users) and test suite portability improvements. commit 85e228de580f2ffff0025695a523349cef79d9c7 Author: Eric Wong Date: Tue Feb 26 21:16:27 2013 +0000 manpage: update middleware-related documentation -N/--no-default-middleware needs a corresponding manpage entry. Additionally, the Rack::Chunked/ContentLength middleware comment is out-of-date as of unicorn v4.1.0 commit 1bdb4eda0d868223bd6b3d92db4545a02f5e14f9 Author: Eric Wong Date: Tue Feb 26 21:02:34 2013 +0000 epoll/*: remove user-space array as active queue This prevents pathological starvation cases where the user-space ready-list can be repopulated infinitely. With EPOLLONESHOT, epoll itself may be used for this task (at a slightly higher cost) by enabling read/write checks, as the epoll ready-list preserves event ordering when used with EPOLLONESHOT. commit 552c4ca305092911ca7613de4b1ba310e5481775 Author: Eric Wong Date: Tue Feb 26 20:07:30 2013 +0000 xepoll_thread_*/client: EPOLLONESHOT implies EPOLLET No need to specify both flags for epoll (confirmed by reading fs/eventpoll.c in the Linux kernel). commit 81e555569fc254ed9d592c8734695b22d4f9bc12 Author: Eric Wong Date: Tue Feb 26 08:19:05 2013 +0000 doc: add HACKING document Thanks to Alex Wolfe for noticing. commit f8b5181e744848468bf3bb0fe469795f9113cf4c Author: Eric Wong Date: Tue Feb 26 07:42:51 2013 +0000 tests: update checks for Ruby 2.0.0 EventMachine/NeverBlock currently do not build on Ruby 2.0.0 commit 95d6719722f31987c72052b000f67d99989a81c8 Author: Eric Wong Date: Tue Feb 26 03:16:46 2013 +0000 bump unicorn dependency to 4.6.2+ for Ruby 2.0.0 This ensures we're compatible with the latest stable Ruby version. commit 83a3b49dd3a1f1885ca56e9889ff22aa7b7c6136 Author: Eric Wong Date: Tue Feb 26 03:14:26 2013 +0000 gemspec: set licenses= attribute Old versions of RubyGems which could not handle this attribute are likely no longer in use. commit 7dd14b2780b87be58c7afbd03df8d1f7cc3e9575 Author: Eric Wong Date: Sat Feb 16 00:04:53 2013 +0000 GIT-VERSION-GEN: rewrite to manage RAINBOWS_VERSION const This DRYs up versioning and makes packages easier to distribute. commit e166cfe5e8d648b544b1291ec157bd234a425e21 Author: Eric Wong Date: Fri Feb 8 22:45:20 2013 +0000 hijacking support for Rack 1.5.x users This requires Rack 1.5.x and unicorn 4.6.0 for hijacking support. Older versions of Rack continue to work fine, but we must use unicorn 4.6.0 features to support this. commit e6faf9e26bcb172026a4984ecadbaa8b6789bcb7 Author: Eric Wong Date: Mon Feb 4 12:39:09 2013 +0000 tests: "wc -l" portability for *BSDs On FreeBSD 9.0, "wc -l" emits leading whitespace, so filter it through tr -d '[:space:]' to eliminate it. commit f4e3bac180ff01256832f98655636f79b52f9d5b Author: Eric Wong Date: Fri Jan 25 02:10:05 2013 +0000 tests: bump version dependencies for Isolate Most of these test dependencies may be safely bumped. commit 8a6117a22a7d01eeb5adc63d3152acf435cd3176 Author: Eric Wong Date: Thu Jan 24 23:33:54 2013 +0000 tests: "wc -c" portability for *BSDs On FreeBSD 9.0, "wc -c" emits leading whitespace, so filter it through tr -d '[:space:]' to eliminate it. commit 0ba6fc3c30b9cf530faf7fcf5ce7be519ec13fe7 Author: Eric Wong Date: Thu Jan 24 23:13:41 2013 +0000 tests: replace non-portable "date +%s" with ruby equivalent "date +%s" is not in POSIX (it is in GNU, and at least FreeBSD 9.0, possibly earlier). The Ruby equivalent should be sufficiently portable between different Ruby versions. This change was automated via: perl -i -p -e 's/date \+%s/unix_time/' t/*.sh commit cbff7b0892148b037581541184364e0e91d2a138 Author: Eric Wong Date: Thu Jan 24 22:59:16 2013 +0000 tests: remove utee and use tee(1) instead POSIX already stipulates tee(1) must be unbuffered. I think my decision to use utee was due to my being misled by a bug in older curl where -N did not work as advertised (but --no-buffer did). commit a552fb90230eb65c28897398c7786dc9a13446ca Author: Lin Jen-Shin Date: Tue Jan 29 11:44:06 2013 +0800 Add -N or --no-default-middleware option. This would prevent Unicorn (Rainbows) from adding default middleware, as if RACK_ENV were always none. (not development nor deployment) This is implemented in Unicorn, so we only need to update the option parser here. Discussion thread on Unicorn mailing list: http://rubyforge.org/pipermail/mongrel-unicorn/2013-January/001675.html Signed-off-by: Eric Wong commit 49f70632e2f4a9b84fd4fced7439d0844fed1bbd Author: Eric Wong Date: Thu Jan 24 19:47:41 2013 +0000 epoll: ensure closing of pipelined clients if required on_read normally relies on the close checking in on_readable, but on_deferred_write_complete may be called from on_writable instead (bypassing the close check of on_readable). This affects both Epoll and XEpoll users, but only if they were sending responses via body#to_path and triggering on_deferred_write_complete. While we're at it, favor non-recursive want_more instead of calling on_readable recursively in ev_write_responses to prevent stack growth.