coolio+xepoll_thread*: use shutdown() for keepalive timeout
[rainbows.git] / t / kgio-pipe-response.ru
blob9c70d474208a87b588397fdf147cb5ecb12033c3
1 # must be run without Rack::Lint since that clobbers to_path
2 use Rainbows::DevFdResponse
3 run(lambda { |env|
4   io = case env["rainbows.model"].to_s
5   when /Fiber/
6     Rainbows::Fiber::IO::Pipe
7   else
8     Kgio::Pipe
9   end.popen('cat random_blob', 'rb')
11   [ 200,
12     {
13       'Content-Length' => ::File.stat('random_blob').size.to_s,
14       'Content-Type' => 'application/octet-stream',
15     },
16     io
17   ]