about summary refs log tree commit homepage
path: root/t/fast-pipe-response.ru
diff options
context:
space:
mode:
Diffstat (limited to 't/fast-pipe-response.ru')
-rw-r--r--t/fast-pipe-response.ru12
1 files changed, 12 insertions, 0 deletions
diff --git a/t/fast-pipe-response.ru b/t/fast-pipe-response.ru
new file mode 100644
index 0000000..01f4d59
--- /dev/null
+++ b/t/fast-pipe-response.ru
@@ -0,0 +1,12 @@
+# must be run without Rack::Lint since that clobbers to_path
+use Rainbows::DevFdResponse
+run(lambda { |env|
+  env['rainbows.autochunk'] = false
+  [ 200,
+    {
+      'X-Rainbows-Autochunk' => 'no',
+      'Content-Length' => ::File.stat('random_blob').size.to_s,
+      'Content-Type' => 'application/octet-stream',
+    },
+    IO.popen('cat random_blob', 'rb') ]
+})