diff options
author | Andrey Zelenkov <zelenkov@nginx.com> | 2018-03-21 18:26:40 +0300 |
---|---|---|
committer | Andrey Zelenkov <zelenkov@nginx.com> | 2018-03-21 18:26:40 +0300 |
commit | c7e67446a3054998893d64cbab150810d2a99aa5 (patch) | |
tree | 55e447f271a8553112d93149851b71a83eb5af43 /test/ruby/input_rewind | |
parent | 37051b6c15cce7d6ab01c50e1086f8ef0b34e93d (diff) | |
download | unit-c7e67446a3054998893d64cbab150810d2a99aa5.tar.gz unit-c7e67446a3054998893d64cbab150810d2a99aa5.tar.bz2 |
Tests: Ruby module.
Diffstat (limited to '')
-rw-r--r-- | test/ruby/input_rewind/config.ru | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/ruby/input_rewind/config.ru b/test/ruby/input_rewind/config.ru new file mode 100644 index 00000000..fc0d6535 --- /dev/null +++ b/test/ruby/input_rewind/config.ru @@ -0,0 +1,8 @@ +app = Proc.new do |env| + env['rack.input'].read + env['rack.input'].rewind + body = env['rack.input'].read + ['200', {'Content-Length' => body.length.to_s}, [body]] +end + +run app |