summary refs log tree commit homepage
path: root/lib/rainbows/process_client.rb
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2010-12-30 08:32:24 +0000
committerEric Wong <normalperson@yhbt.net>2011-01-04 16:21:17 -0800
commit72a315441937f9e0531112f2b7080da39ca6064d (patch)
treefe310ac81f73605f2e278d8680aaf9eb4e755a71 /lib/rainbows/process_client.rb
parent1f28534fce2b30bf3099ea0d014b62ac4a3205f0 (diff)
This lets us simplify repetitive checks worry less about
properly maintaining/closing client connections for each
concurrency model we support.
Diffstat (limited to 'lib/rainbows/process_client.rb')
-rw-r--r--lib/rainbows/process_client.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/rainbows/process_client.rb b/lib/rainbows/process_client.rb
index 271185d..54e59e8 100644
--- a/lib/rainbows/process_client.rb
+++ b/lib/rainbows/process_client.rb
@@ -4,7 +4,7 @@ require 'rainbows/rack_input'
 module Rainbows::ProcessClient
   G = Rainbows::G
   include Rainbows::Response
-  HttpParser = Unicorn::HttpParser
+  HttpParser = Rainbows::HttpParser
   include Rainbows::RackInput
   include Rainbows::Const
 
@@ -37,8 +37,7 @@ module Rainbows::ProcessClient
       if hp.headers?
         headers = HH.new(headers)
         range = make_range!(env, status, headers) and status = range.shift
-        alive = hp.next? && G.alive
-        headers[CONNECTION] = alive ? KEEP_ALIVE : CLOSE
+        headers[CONNECTION] = (alive = hp.next?) ? KEEP_ALIVE : CLOSE
         client.write(response_header(status, headers))
       end
       write_body(client, body, range)