xref: /unit/test/ruby/variables/config.ru (revision 2088:7be66a868748)
1585Szelenkov@nginx.comapp = Proc.new do |env|
2585Szelenkov@nginx.com    body = env['rack.input'].read
3585Szelenkov@nginx.com    version = env['rack.version'].join('')
4585Szelenkov@nginx.com
5585Szelenkov@nginx.com    ['200', {
6585Szelenkov@nginx.com        'Content-Type' => env['CONTENT_TYPE'],
7585Szelenkov@nginx.com        'Content-Length' => body.length.to_s,
8585Szelenkov@nginx.com        'Request-Method' => env['REQUEST_METHOD'],
9585Szelenkov@nginx.com        'Request-Uri' => env['REQUEST_URI'],
10585Szelenkov@nginx.com        'Http-Host' => env['HTTP_HOST'],
11*2088Szelenkov@nginx.com        'Script-Name' => env['SCRIPT_NAME'],
12585Szelenkov@nginx.com        'Server-Protocol' => env['SERVER_PROTOCOL'],
13674Szelenkov@nginx.com        'Server-Software' => env['SERVER_SOFTWARE'],
14585Szelenkov@nginx.com        'Custom-Header' => env['HTTP_CUSTOM_HEADER'],
15585Szelenkov@nginx.com        'Rack-Version' => version,
16585Szelenkov@nginx.com        'Rack-Url-Scheme' => env['rack.url_scheme'],
17585Szelenkov@nginx.com        'Rack-Multithread' => env['rack.multithread'].to_s,
18585Szelenkov@nginx.com        'Rack-Multiprocess' => env['rack.multiprocess'].to_s,
19585Szelenkov@nginx.com        'Rack-Run-Once' => env['rack.run_once'].to_s,
20585Szelenkov@nginx.com        'Rack-Hijack-Q' => env['rack.hijack?'].to_s,
21585Szelenkov@nginx.com        'Rack-Hijack' => env['rack.hijack'].to_s,
22585Szelenkov@nginx.com        'Rack-Hijack-IO' => env['rack.hijack_io'].to_s
23585Szelenkov@nginx.com    }, [body]]
24585Szelenkov@nginx.comend
25585Szelenkov@nginx.com
26585Szelenkov@nginx.comrun app
27