summary refs log tree commit homepage
path: root/t/fast-pipe-response.ru
blob: 77c8d710ecc206f0ebc52f9f74aedaa79e1ab2ff (plain)
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',
    },
    IO.popen('cat random_blob', 'rb') ]
})