From 51e656e3db593c662e7abdf969dd79570525aac9 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 13 Dec 2009 23:14:47 -0800 Subject: share some constants with Unicorn Make RACK_DEFAULTS == Unicorn::HttpRequest::DEFAULTS and LOCALHOST == Unicorn::HttpRequest::LOCALHOST No point in having a duplicate objects, and it also makes it easier to share runtime constant modifications between servers. --- lib/rainbows/const.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/rainbows/const.rb') diff --git a/lib/rainbows/const.rb b/lib/rainbows/const.rb index 1018623..e707ca5 100644 --- a/lib/rainbows/const.rb +++ b/lib/rainbows/const.rb @@ -7,7 +7,7 @@ module Rainbows include Unicorn::Const - RACK_DEFAULTS = ::Unicorn::HttpRequest::DEFAULTS.merge({ + RACK_DEFAULTS = Unicorn::HttpRequest::DEFAULTS.update({ "SERVER_SOFTWARE" => "Rainbows! #{RAINBOWS_VERSION}", # using the Rev model, we'll automatically chunk pipe and socket objects @@ -17,7 +17,7 @@ module Rainbows CONN_CLOSE = "Connection: close\r\n" CONN_ALIVE = "Connection: keep-alive\r\n" - LOCALHOST = "127.0.0.1" + LOCALHOST = Unicorn::HttpRequest::LOCALHOST # client IO object that supports reading and writing directly # without filtering it through the HTTP chunk parser. -- cgit v1.2.3-24-ge0c7