2 use Rainbows::DevFdResponse
3 script_chunked = <<-EOF
4 for i in 0 1 2 3 4 5 6 7 8 9
6 printf '1\r\n%s\r\n' $i
12 script_identity = <<-EOF
13 for i in 0 1 2 3 4 5 6 7 8 9
21 env['rainbows.autochunk'] = false
22 headers = { 'Content-Type' => 'text/plain' }
24 script = case env["HTTP_VERSION"]
28 headers['Transfer-Encoding'] = 'chunked'
32 [ 200, headers, IO.popen(script, 'rb') ].freeze