oob_gc: reimplement to fix breakage and add tests
commitfaeb3223636c39ea8df4017dc9a9d39ac649b26d
authorEric Wong <normalperson@yhbt.net>
Fri, 29 Apr 2011 22:48:35 +0000 (29 15:48 -0700)
committerEric Wong <normalperson@yhbt.net>
Fri, 29 Apr 2011 23:01:14 +0000 (29 16:01 -0700)
treefce6b3ee71fc84e41ed3227ff2136b167b2d59b6
parentce4995a4daf1e4da7034dc87fd218a283c405410
oob_gc: reimplement to fix breakage and add tests

This was broken since v3.3.1[1] since nginx relies on a closed
socket (and not Content-Length/Transfer-Encoding) to detect
a response completion.  We have to close the client socket
before invoking GC to ensure the client sees the response
in a timely manner.

[1] - commit b72a86f66c722d56a6d77ed1d2779ace6ad103ed
examples/big_app_gc.rb
lib/unicorn/oob_gc.rb
t/oob_gc.ru [new file with mode: 0644]
t/oob_gc_path.ru [new file with mode: 0644]
t/t9001-oob_gc.sh [new file with mode: 0755]
t/t9002-oob_gc-path.sh [new file with mode: 0644]