rainbows.git  about / heads / tags
Unicorn for sleepy apps and slow clients
blob edd2aacdf5e2e2dac2e85703feb0339520d89d28 312 bytes (raw)
$ git show v3.0.0:t/kgio-pipe-response.ru	# shows this blob on the CLI

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
 
# must be run without Rack::Lint since that clobbers to_path
use Rainbows::DevFdResponse
run(lambda { |env|
  [ 200,
    {
      'Content-Length' => ::File.stat('random_blob').size.to_s,
      'Content-Type' => 'application/octet-stream',
    },
    Rainbows::Fiber::IO::Pipe.popen('cat random_blob', 'rb') ]
})

git clone https://yhbt.net/rainbows.git