summaryrefslogblamecommitdiffhomepage
path: root/test/ruby/input_gets_all/config.ru
blob: 186b2418567a72c72e4b5b225658bb2305ac87fd (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14













                                            
app = Proc.new do |env|
    body = ''
    buf = ''
    loop do
        buf = env['rack.input'].gets
        break if buf == nil
        body += buf
    end
    ['200', {
        'Content-Length' => body.length.to_s
    }, [body]]
end

run app