about summary refs log tree commit homepage
path: root/t/kgio-pipe-response.ru
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2010-10-22 02:50:09 +0000
committerEric Wong <normalperson@yhbt.net>2010-10-22 18:37:45 +0000
commit4a568eeb7d17885579790d0ae004f04aa13479cb (patch)
tree02a4a93997c3393c0be399d5363d6127fa0d6b44 /t/kgio-pipe-response.ru
parent6d46978bdc8d2ee4263431ecdcada53389b12597 (diff)
downloadrainbows-4a568eeb7d17885579790d0ae004f04aa13479cb.tar.gz
Applications may use wait_readable-aware methods directly
to work with Rainbows!
Diffstat (limited to 't/kgio-pipe-response.ru')
-rw-r--r--t/kgio-pipe-response.ru10
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') ]
+})