summary refs log tree commit homepage
path: root/lib/rainbows/process_client.rb
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2010-11-19 18:39:02 -0800
committerEric Wong <normalperson@yhbt.net>2010-11-19 18:39:02 -0800
commitda9dfc1dece4fbcdf2a8e8ccdb4914ce4aa3a998 (patch)
tree4161062fefbf0539ed50327588b702cda04769f7 /lib/rainbows/process_client.rb
parentc6ffae22748bc22d5ef88fea2a3ca67f480ee74b (diff)
Unicorn 3.x includes HttpParser#next? which will reset the
parser for keepalive requests without extra steps.
Diffstat (limited to 'lib/rainbows/process_client.rb')
-rw-r--r--lib/rainbows/process_client.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/rainbows/process_client.rb b/lib/rainbows/process_client.rb
index 143a7a9..3055b9d 100644
--- a/lib/rainbows/process_client.rb
+++ b/lib/rainbows/process_client.rb
@@ -40,12 +40,12 @@ module Rainbows::ProcessClient
       if hp.headers?
         headers = HH.new(headers)
         range = make_range!(env, status, headers) and status = range.shift
-        alive = hp.keepalive? && G.alive
+        alive = hp.next? && G.alive
         headers[CONNECTION] = alive ? KEEP_ALIVE : CLOSE
         client.write(response_header(status, headers))
       end
       write_body(client, body, range)
-    end while alive && hp.reset.nil?
+    end while alive
   # if we get any error, try to write something back to the client
   # assuming we haven't closed the socket, but don't get hung up
   # if the socket is already closed or broken.  We'll always ensure