diff options
author | Eric Wong <normalperson@yhbt.net> | 2010-07-22 05:42:16 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2010-07-22 09:09:37 +0000 |
commit | 416d3a0f868571319a2b29b0034d2dba68e4d5b3 (patch) | |
tree | 081bdbdcce23063667c707212ceda45bbc322675 /lib/rainbows/fiber/rev.rb | |
parent | 015daa81f26afc59d1da857b8bbedfb80eb532b1 (diff) | |
download | rainbows-416d3a0f868571319a2b29b0034d2dba68e4d5b3.tar.gz |
The FileStreamer class of EventMachine (and by extension NeverBlock) unfortunately doesn't handle this. It's possible to do with Revactor (since it uses Rev under the covers), but we'll support what we can easily for now.
Diffstat (limited to 'lib/rainbows/fiber/rev.rb')
-rw-r--r-- | lib/rainbows/fiber/rev.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/rainbows/fiber/rev.rb b/lib/rainbows/fiber/rev.rb index 5bf4fdd..d837c01 100644 --- a/lib/rainbows/fiber/rev.rb +++ b/lib/rainbows/fiber/rev.rb @@ -100,6 +100,7 @@ module Rainbows::Fiber if hp.headers? headers = HH.new(headers) + range = parse_range(env, status, headers) and status = range.shift headers[CONNECTION] = if hp.keepalive? && G.alive KEEP_ALIVE else @@ -108,7 +109,7 @@ module Rainbows::Fiber end client.write(response_header(status, headers)) end - write_body(client, body) + write_body(client, body, range) end while env && env.clear && hp.reset.nil? rescue => e Error.write(io, e) |