repo.or.cz
/
rainbows.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
t0015: increase reliability of test
[rainbows.git]
/
t
/
async-response-no-autochunk.ru
blob
1eda5538c6f0ddb521bdacab261d4759ba9bedf8
1
use Rack::Chunked
2
use Rainbows::DevFdResponse
3
script = <<-EOF
4
for i in 0 1 2 3 4 5 6 7 8 9
5
do
6
printf '1\r\n%s\r\n' $i
7
sleep 1
8
done
9
printf '0\r\n\r\n'
10
EOF
11
12
run lambda { |env|
13
env['rainbows.autochunk'] = false
14
io = IO.popen(script, 'rb')
15
[
16
200,
17
{
18
'Content-Type' => 'text/plain',
19
'Transfer-Encoding' => 'chunked',
20
},
21
io
22
].freeze
23
}