rainbows.git about / heads / tags Unicorn for sleepy apps and slow clients
blob ed9e1ee1d41355c892e08e99b9a818179a426a62 226 bytes (raw) $ git show HEAD:t/t9100.ru # shows this blob on the CLI
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" ] ] }
git clone https://yhbt.net/rainbows.git