rainbows.git about / heads / tags Unicorn for sleepy apps and slow clients
blob b372afd552300c26051ec51479de029f8e720bbc 301 bytes (raw) $ git show HEAD:t/worker-follows-master-to-death.ru # shows this blob on the CLI
1 2 3 4 5 6 7 8 9 10 11 12
use Rack::ContentLength headers = { 'Content-Type' => 'text/plain' } run lambda { |env| /\A100-continue\z/i =~ env['HTTP_EXPECT'] and return [ 100, {}, [] ] env['rack.input'].read case env["PATH_INFO"] when %r{/sleep/(\d+)} Rainbows.sleep($1.to_i) end [ 200, headers, [ "#$$\n" ] ] }
git clone https://yhbt.net/rainbows.git