diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-11-07 12:42:57 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-11-07 12:42:57 -0800 |
commit | 129473b7c69e08b23825a2b067ccd9860cea797e (patch) | |
tree | 3ee634ce3538ee0a0e2ba2d5fc741a78da18e8a6 /lib | |
parent | 7e35ea595f4742ace9579402323515031d69fc87 (diff) | |
download | rainbows-129473b7c69e08b23825a2b067ccd9860cea797e.tar.gz |
In the upcoming RevThread* models, the parser may be parsing other requests already by the time DeferredResponse is called.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/rainbows/rev/client.rb | 4 | ||||
-rw-r--r-- | lib/rainbows/rev/deferred_response.rb | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/rainbows/rev/client.rb b/lib/rainbows/rev/client.rb index d191787..c9d058e 100644 --- a/lib/rainbows/rev/client.rb +++ b/lib/rainbows/rev/client.rb @@ -20,9 +20,9 @@ module Rainbows # devices where read(2) is uninterruptable. Unfortunately, NFS and ilk # are also part of this. We'll also stick DeferredResponse bodies in # here to prevent connections from being closed on us. - def defer_body(io) + def defer_body(io, out_headers) @deferred_bodies << io - on_write_complete unless @hp.headers? # triggers a write + on_write_complete unless out_headers # triggers a write end def app_call diff --git a/lib/rainbows/rev/deferred_response.rb b/lib/rainbows/rev/deferred_response.rb index d97abbe..abf3514 100644 --- a/lib/rainbows/rev/deferred_response.rb +++ b/lib/rainbows/rev/deferred_response.rb @@ -39,7 +39,7 @@ module Rainbows else # char/block device, directory, whatever... nobody cares return response end - client.defer_body(io) + client.defer_body(io, out) [ response.first, headers.to_hash, [] ] end |