summaryrefslogtreecommitdiffhomepage
path: root/test/ruby/variables/config.ru
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--test/ruby/variables/config.ru24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/ruby/variables/config.ru b/test/ruby/variables/config.ru
new file mode 100644
index 00000000..4caac3c2
--- /dev/null
+++ b/test/ruby/variables/config.ru
@@ -0,0 +1,24 @@
+app = Proc.new do |env|
+ body = env['rack.input'].read
+ version = env['rack.version'].join('')
+
+ ['200', {
+ 'Content-Type' => env['CONTENT_TYPE'],
+ 'Content-Length' => body.length.to_s,
+ 'Request-Method' => env['REQUEST_METHOD'],
+ 'Request-Uri' => env['REQUEST_URI'],
+ 'Http-Host' => env['HTTP_HOST'],
+ 'Server-Protocol' => env['SERVER_PROTOCOL'],
+ 'Custom-Header' => env['HTTP_CUSTOM_HEADER'],
+ 'Rack-Version' => version,
+ 'Rack-Url-Scheme' => env['rack.url_scheme'],
+ 'Rack-Multithread' => env['rack.multithread'].to_s,
+ 'Rack-Multiprocess' => env['rack.multiprocess'].to_s,
+ 'Rack-Run-Once' => env['rack.run_once'].to_s,
+ 'Rack-Hijack-Q' => env['rack.hijack?'].to_s,
+ 'Rack-Hijack' => env['rack.hijack'].to_s,
+ 'Rack-Hijack-IO' => env['rack.hijack_io'].to_s
+ }, [body]]
+end
+
+run app