about summary refs log tree commit homepage
diff options
context:
space:
mode:
-rw-r--r--lib/rainbows/revactor/client.rb2
-rw-r--r--lib/rainbows/revactor/proxy.rb2
-rw-r--r--lib/rainbows/reverse_proxy/coolio.rb6
-rw-r--r--lib/rainbows/reverse_proxy/event_machine.rb2
4 files changed, 6 insertions, 6 deletions
diff --git a/lib/rainbows/revactor/client.rb b/lib/rainbows/revactor/client.rb
index 5b1e52d..c24b137 100644
--- a/lib/rainbows/revactor/client.rb
+++ b/lib/rainbows/revactor/client.rb
@@ -32,7 +32,7 @@ class Rainbows::Revactor::Client
   end
 
   def set_input(env, hp)
-    env[RACK_INPUT] = 0 == hp.content_length ?
+    env['rack.input'] = 0 == hp.content_length ?
                       NULL_IO : IC.new(@ts = TeeSocket.new(@client), hp)
   end
 
diff --git a/lib/rainbows/revactor/proxy.rb b/lib/rainbows/revactor/proxy.rb
index 4715981..6bac7d5 100644
--- a/lib/rainbows/revactor/proxy.rb
+++ b/lib/rainbows/revactor/proxy.rb
@@ -22,7 +22,7 @@ class Rainbows::Revactor::Proxy < Rev::IO
     # (instead of Errno::EPIPE), so we need to limit the rescue
     # to just readpartial and let EOFErrors during yield bubble up
     begin
-      buf = readpartial(INPUT_SIZE)
+      buf = readpartial(16384)
     rescue EOFError
       break
     end while yield(buf) || true
diff --git a/lib/rainbows/reverse_proxy/coolio.rb b/lib/rainbows/reverse_proxy/coolio.rb
index 2a977e0..86f2b79 100644
--- a/lib/rainbows/reverse_proxy/coolio.rb
+++ b/lib/rainbows/reverse_proxy/coolio.rb
@@ -32,20 +32,20 @@ module Rainbows::ReverseProxy::Coolio
       when :wait_readable
         return
       when nil
-        @env[AsyncCallback].call(@response)
+        @env['async.callback'].call(@response)
         return close
       end while true # we always read until EAGAIN or EOF
 
       rescue => e
         case e
         when Errno::ECONNRESET
-          @env[AsyncCallback].call(@response)
+          @env['async.callback'].call(@response)
           return close
         when SystemCallError
         else
           Unicorn.log_error(@env["rack.logger"], "on_readable", e)
         end
-        @env[AsyncCallback].call(Rainbows::ReverseProxy::E502)
+        @env['async.callback'].call(Rainbows::ReverseProxy::E502)
         close
     end
   end
diff --git a/lib/rainbows/reverse_proxy/event_machine.rb b/lib/rainbows/reverse_proxy/event_machine.rb
index 8cb382c..d92254d 100644
--- a/lib/rainbows/reverse_proxy/event_machine.rb
+++ b/lib/rainbows/reverse_proxy/event_machine.rb
@@ -30,7 +30,7 @@ module Rainbows::ReverseProxy::EventMachine
     end
 
     def unbind
-      @env[AsyncCallback].call(@response || Rainbows::ReverseProxy::E502)
+      @env['async.callback'].call(@response || Rainbows::ReverseProxy::E502)
     end
   end