about summary refs log tree commit homepage
path: root/lib/rainbows/ev_core.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rainbows/ev_core.rb')
-rw-r--r--lib/rainbows/ev_core.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/rainbows/ev_core.rb b/lib/rainbows/ev_core.rb
index 60fbdca..471f6a3 100644
--- a/lib/rainbows/ev_core.rb
+++ b/lib/rainbows/ev_core.rb
@@ -36,14 +36,15 @@ module Rainbows::EvCore
   end
 
   # returns whether to enable response chunking for autochunk models
-  def stream_response_headers(status, headers)
+  def stream_response_headers(status, headers, alive)
+    headers = Rack::Utils::HeaderHash.new(headers)
     if headers['Content-Length']
       rv = false
     else
       rv = !!(headers['Transfer-Encoding'] =~ %r{\Achunked\z}i)
       rv = false if headers.delete('X-Rainbows-Autochunk') == 'no'
     end
-    write(response_header(status, headers))
+    write_headers(status, headers, alive)
     rv
   end