From ed33b9c0d060806b41e952a50e0ab65a0f5fe21a Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 20 Jan 2011 02:20:19 -0800 Subject: ev_core: localize 413 error constant It's the only place we ever use it --- lib/rainbows/const.rb | 2 -- lib/rainbows/ev_core.rb | 4 +++- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/rainbows/const.rb b/lib/rainbows/const.rb index 04ed92d..33df05d 100644 --- a/lib/rainbows/const.rb +++ b/lib/rainbows/const.rb @@ -20,8 +20,6 @@ module Rainbows::Const # of the official spec, but for now it is "hack.io" CLIENT_IO = "hack.io".freeze - ERROR_413_RESPONSE = "HTTP/1.1 413 Request Entity Too Large\r\n\r\n" - RACK_INPUT = Unicorn::HttpRequest::RACK_INPUT REMOTE_ADDR = Unicorn::HttpRequest::REMOTE_ADDR end diff --git a/lib/rainbows/ev_core.rb b/lib/rainbows/ev_core.rb index d958b18..d218553 100644 --- a/lib/rainbows/ev_core.rb +++ b/lib/rainbows/ev_core.rb @@ -115,8 +115,10 @@ module Rainbows::EvCore handle_error(e) end + ERROR_413_RESPONSE = "HTTP/1.1 413 Request Entity Too Large\r\n\r\n" + def err_413(msg) - write(Rainbows::Const::ERROR_413_RESPONSE) + write(ERROR_413_RESPONSE) quit # zip back up the stack raise IOError, msg, [] -- cgit v1.2.3-24-ge0c7