about summary refs log tree commit homepage
diff options
context:
space:
mode:
-rw-r--r--lib/rainbows/ev_core.rb1
-rw-r--r--lib/rainbows/event_machine.rb2
-rw-r--r--lib/rainbows/rev/client.rb2
3 files changed, 3 insertions, 2 deletions
diff --git a/lib/rainbows/ev_core.rb b/lib/rainbows/ev_core.rb
index 017fe5c..e0fb029 100644
--- a/lib/rainbows/ev_core.rb
+++ b/lib/rainbows/ev_core.rb
@@ -74,6 +74,7 @@ module Rainbows
         end
       when :trailers
         if @hp.trailers(@env, @buf << data)
+          @input.rewind
           app_call
           @input.close if File === @input
         end
diff --git a/lib/rainbows/event_machine.rb b/lib/rainbows/event_machine.rb
index 54c1bc0..b099721 100644
--- a/lib/rainbows/event_machine.rb
+++ b/lib/rainbows/event_machine.rb
@@ -53,7 +53,7 @@ module Rainbows
       def app_call
         set_comm_inactivity_timeout 0
         begin
-          (@env[RACK_INPUT] = @input).rewind
+          @env[RACK_INPUT] = @input
           @env[REMOTE_ADDR] = @remote_addr
           @env[ASYNC_CALLBACK] = method(:response_write)
 
diff --git a/lib/rainbows/rev/client.rb b/lib/rainbows/rev/client.rb
index b30bd0e..f7a9750 100644
--- a/lib/rainbows/rev/client.rb
+++ b/lib/rainbows/rev/client.rb
@@ -30,7 +30,7 @@ module Rainbows
       def app_call
         begin
           KATO.delete(self)
-          (@env[RACK_INPUT] = @input).rewind
+          @env[RACK_INPUT] = @input
           @env[REMOTE_ADDR] = @remote_addr
           response = APP.call(@env.update(RACK_DEFAULTS))
           alive = @hp.keepalive? && G.alive