diff options
author | Eric Wong <normalperson@yhbt.net> | 2010-06-03 15:23:01 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2010-06-03 15:26:01 -0700 |
commit | cf122e941e10c2812b7ba5e75c053a28950ddcb6 (patch) | |
tree | f0c2ba767c7e7af0384a6c4ff470f4fc4903bad5 /t/t9001.ru | |
parent | 5a0a190253434d3eef5332d979d56f3e16e876bd (diff) | |
download | rainbows-cf122e941e10c2812b7ba5e75c053a28950ddcb6.tar.gz |
This lets most concurrency models understand and process X-Sendfile efficiently with IO.copy_stream under Ruby 1.9. EventMachine can take advantage of this middleware under both Ruby 1.8 and Ruby 1.9.
Diffstat (limited to 't/t9001.ru')
-rw-r--r-- | t/t9001.ru | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/t/t9001.ru b/t/t9001.ru new file mode 100644 index 0000000..0a523b9 --- /dev/null +++ b/t/t9001.ru @@ -0,0 +1,11 @@ +use Rainbows::Sendfile +run lambda { |env| + path = "#{Dir.pwd}/random_blob" + [ 200, + { + 'X-Sendfile' => path, + 'Content-Type' => 'application/octet-stream' + }, + [] + ] +} |