about summary refs log tree commit homepage
path: root/lib/rainbows
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rainbows')
-rw-r--r--lib/rainbows/event_machine/client.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/rainbows/event_machine/client.rb b/lib/rainbows/event_machine/client.rb
index e56931f..fc0dfe3 100644
--- a/lib/rainbows/event_machine/client.rb
+++ b/lib/rainbows/event_machine/client.rb
@@ -64,8 +64,11 @@ class Rainbows::EventMachine::Client < EM::Connection
     @state = :headers if alive
     if body.respond_to?(:errback) && body.respond_to?(:callback)
       @deferred = body
+      write_headers(status, headers, alive)
+      write_body_each(body)
       deferred_errback(body)
       deferred_callback(body, alive)
+      return
     elsif body.respond_to?(:to_path)
       st = File.stat(path = body.to_path)