From fe94d80cb37ee441762ad2a8f5c25092f8eb57a8 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 27 Sep 2010 22:39:02 -0700 Subject: http_request: avoid globals Rainbows! will be able to reuse this. --- lib/unicorn.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/unicorn.rb') diff --git a/lib/unicorn.rb b/lib/unicorn.rb index c972f65..418b138 100644 --- a/lib/unicorn.rb +++ b/lib/unicorn.rb @@ -449,7 +449,7 @@ module Unicorn # Wake up every second anyways to run murder_lazy_workers def master_sleep(sec) IO.select([ SELF_PIPE[0] ], nil, nil, sec) or return - SELF_PIPE[0].read_nonblock(Const::CHUNK_SIZE, HttpRequest::BUF) + SELF_PIPE[0].read_nonblock(Const::CHUNK_SIZE) rescue Errno::EAGAIN, Errno::EINTR end @@ -599,7 +599,7 @@ module Unicorn r = app.call(env) end # r may be frozen or const, so don't modify it - HttpRequest::PARSER.headers? or r = [ r[0], nil, r[2] ] + REQUEST.response_headers? or r = [ r[0], nil, r[2] ] http_response_write(client, r) rescue => e handle_error(client, e) -- cgit v1.2.3-24-ge0c7