diff options
Diffstat (limited to 'test/ruby/input_gets_all')
-rw-r--r-- | test/ruby/input_gets_all/config.ru | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/ruby/input_gets_all/config.ru b/test/ruby/input_gets_all/config.ru new file mode 100644 index 00000000..186b2418 --- /dev/null +++ b/test/ruby/input_gets_all/config.ru @@ -0,0 +1,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 |