diff options
author | Eric Wong <normalperson@yhbt.net> | 2010-07-19 10:10:06 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2010-07-19 17:04:37 -0700 |
commit | 60039518e03b0f1a0f530eefe008ebf72c55afe4 (patch) | |
tree | c31a8ff013634812ae71f7c935d309c652d5052a /lib/rainbows/rev/client.rb | |
parent | 0cd65fa1e01be369b270c72053cf21a3d6bcb45f (diff) | |
download | rainbows-60039518e03b0f1a0f530eefe008ebf72c55afe4.tar.gz |
Middlewares like Clogger may wrap Rack::File responses with another body that responds to to_path and still rely on #close to trigger an action (writing out the log file).
Diffstat (limited to 'lib/rainbows/rev/client.rb')
-rw-r--r-- | lib/rainbows/rev/client.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/rainbows/rev/client.rb b/lib/rainbows/rev/client.rb index 4d1aaec..502615e 100644 --- a/lib/rainbows/rev/client.rb +++ b/lib/rainbows/rev/client.rb @@ -8,6 +8,7 @@ module Rainbows include Rainbows::ByteSlice include Rainbows::EvCore G = Rainbows::G + F = Rainbows::StreamFile def initialize(io) CONN[self] = false @@ -80,7 +81,7 @@ module Rainbows if st.file? write(response_header(status, headers)) if headers - return defer_body(to_sendfile(io)) + return defer_body(F.new(0, io, body)) elsif st.socket? || st.pipe? return stream_response(status, headers, io, body) end |