about summary refs log tree commit homepage
path: root/t/fast-pipe-response.ru
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2010-07-19 10:09:56 +0000
committerEric Wong <normalperson@yhbt.net>2010-07-19 17:04:26 -0700
commit1e6d3d19da2b62bfe7f8fd7827dcad3ee3fe9923 (patch)
tree5de875617e5cf3befb7c0ae9e1add9b2ee2f451e /t/fast-pipe-response.ru
parentcc18035c5105751a3e67a8e449ee0021fd313ea9 (diff)
downloadrainbows-1e6d3d19da2b62bfe7f8fd7827dcad3ee3fe9923.tar.gz
If a response proxying a pipe (or socket) includes a
Content-Length, do not attempt to outsmart the application
and just use the given Content-Length.

This helps avoid exposing applications to weird internals such
as env["rainbows.autochunk"] and X-Rainbows-* response headers.
Diffstat (limited to 't/fast-pipe-response.ru')
-rw-r--r--t/fast-pipe-response.ru2
1 files changed, 0 insertions, 2 deletions
diff --git a/t/fast-pipe-response.ru b/t/fast-pipe-response.ru
index 01f4d59..77c8d71 100644
--- a/t/fast-pipe-response.ru
+++ b/t/fast-pipe-response.ru
@@ -1,10 +1,8 @@
 # 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',
     },