Sha256: a6ba64a34c77ab71fd957ecd05141161c535cf528b1eb9f8c008c817ae7a37c9

Contents?: true

Size: 383 Bytes

Versions: 15

Compression:

Stored size: 383 Bytes

Contents

use Rack::Chunked
use Rainbows::DevFdResponse
script = <<-EOF
for i in 0 1 2 3 4 5 6 7 8 9
do
	printf '1\r\n%s\r\n' $i
	sleep 1
done
printf '0\r\n\r\n'
EOF

run lambda { |env|
  env['rainbows.autochunk'] = false
  io = IO.popen(script, 'rb')
  io.sync = true
  [
    200,
    {
      'Content-Type' => 'text/plain',
      'Transfer-Encoding' => 'chunked',
    },
    io
  ].freeze
}

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
rainbows-0.94.0 t/async-response-no-autochunk.ru
rainbows-0.93.0 t/async-response-no-autochunk.ru
rainbows-0.92.0 t/async-response-no-autochunk.ru
rainbows-0.91.1 t/async-response-no-autochunk.ru
rainbows-0.91.0 t/async-response-no-autochunk.ru
rainbows-0.90.2 t/async-response-no-autochunk.ru
rainbows-0.90.1 t/async-response-no-autochunk.ru
rainbows-0.90.0 t/async-response-no-autochunk.ru
rainbows-0.9.0 t/async-response-no-autochunk.ru
rainbows-0.8.0 t/async-response-no-autochunk.ru
rainbows-0.7.0 t/async-response-no-autochunk.ru
rainbows-0.6.0 t/async-response-no-autochunk.ru
rainbows-0.5.0 t/async-response-no-autochunk.ru
rainbows-0.4.0 t/async-response-no-autochunk.ru
rainbows-0.3.0 t/async-response-no-autochunk.ru