xref: /unit/test/ruby/input_gets_all/config.ru (revision 585:17703effc76a)
1*585Szelenkov@nginx.comapp = Proc.new do |env|
2*585Szelenkov@nginx.com    body = ''
3*585Szelenkov@nginx.com    buf = ''
4*585Szelenkov@nginx.com    loop do
5*585Szelenkov@nginx.com        buf = env['rack.input'].gets
6*585Szelenkov@nginx.com        break if buf == nil
7*585Szelenkov@nginx.com        body += buf
8*585Szelenkov@nginx.com    end
9*585Szelenkov@nginx.com    ['200', {
10*585Szelenkov@nginx.com        'Content-Length' => body.length.to_s
11*585Szelenkov@nginx.com    }, [body]]
12*585Szelenkov@nginx.comend
13*585Szelenkov@nginx.com
14*585Szelenkov@nginx.comrun app
15