summary refs log tree commit homepage
path: root/t/t9100.ru
blob: ed9e1ee1d41355c892e08e99b9a818179a426a62 (plain)
1
2
3
4
5
6
7
8
9
use Rack::ContentLength
use Rack::ContentType, 'text/plain'
use Rainbows::ThreadTimeout, :timeout => 1
run lambda { |env|
  if env["PATH_INFO"] =~ %r{/([\d\.]+)\z}
    Rainbows.sleep($1.to_f)
  end
  [ 200, [], [ "HI\n" ] ]
}