rainbows.git about / heads / tags Unicorn for sleepy apps and slow clients
blob 98c9a2e3540420a2cda8e36d20be82a0706c30c6 364 bytes (raw) $ git show HEAD:t/t0016.rb # shows this blob on the CLI
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
# -*- encoding: utf-8 -*- module T0016 CHUNK = '©' * 1024 * 1024 BODY = (1..50).map { CHUNK } HEADER = { # BODY.inject(0) { |m,c| m += c.bytesize }.to_s, 'Content-Length' => '104857600', 'Content-Type' => 'text/plain', } def self.call(env) [ 200, HEADER, BODY ] end end $0 == __FILE__ and T0016::BODY.each { |x| $stdout.syswrite(x) }
git clone https://yhbt.net/rainbows.git