httpdate: favor gettimeofday(2) over time(2) for correctness
[unicorn.git] / t / heartbeat-timeout.ru
blob20a79380e98cc1f0af5c55bc3d50a5c9356a2f4d
1 use Rack::ContentLength
2 headers = { 'content-type' => 'text/plain' }
3 run lambda { |env|
4   case env['PATH_INFO']
5   when "/block-forever"
6     Process.kill(:STOP, $$)
7     sleep # in case STOP signal is not received in time
8     [ 500, headers, [ "Should never get here\n" ] ]
9   else
10     [ 200, headers, [ "#$$\n" ] ]
11   end