diff options
Diffstat (limited to 't/kgio-pipe-response.ru')
-rw-r--r-- | t/kgio-pipe-response.ru | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/t/kgio-pipe-response.ru b/t/kgio-pipe-response.ru new file mode 100644 index 0000000..edd2aac --- /dev/null +++ b/t/kgio-pipe-response.ru @@ -0,0 +1,10 @@ +# must be run without Rack::Lint since that clobbers to_path +use Rainbows::DevFdResponse +run(lambda { |env| + [ 200, + { + 'Content-Length' => ::File.stat('random_blob').size.to_s, + 'Content-Type' => 'application/octet-stream', + }, + Rainbows::Fiber::IO::Pipe.popen('cat random_blob', 'rb') ] +}) |