diff options
Diffstat (limited to 't/async-response-no-autochunk.ru')
-rw-r--r-- | t/async-response-no-autochunk.ru | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/t/async-response-no-autochunk.ru b/t/async-response-no-autochunk.ru new file mode 100644 index 0000000..67c6403 --- /dev/null +++ b/t/async-response-no-autochunk.ru @@ -0,0 +1,24 @@ +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 +} |