ensure body is closed during hijack
commit02a072734906ac4c1ea77990207b84895ab4a7cb
authorEric Wong <e@80x24.org>
Tue, 9 Jun 2015 20:17:18 +0000 (9 20:17 +0000)
committerEric Wong <e@80x24.org>
Wed, 10 Jun 2015 09:18:59 +0000 (10 09:18 +0000)
tree04abb7b53211c779637ab5a2f0e2930dbbd2ac6d
parent40b9812029848933037466b2e7b19a47cfbd8363
ensure body is closed during hijack

Middlewares such as Rack::Lock (used by Rails) break badly unless
the response body is closed on hijack, so we will close it to follow
the lead of other popular Rack servers.

While it's unclear if there's anybody using rack.hijack with unicorn,
we'll try to emulate the behavior of other servers as much as
possible.

ref: https://github.com/ngauthier/tubesock/issues/10
lib/unicorn/http_response.rb
lib/unicorn/http_server.rb
t/hijack.ru
t/t0200-rack-hijack.sh
test/unit/test_response.rb