From dad8471b4cc9412b0d56e68d0c143b356998c2a0 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 5 Feb 2009 15:41:06 -0800 Subject: Don't set SCRIPT_NAME to "/" and then clear it for Rack It's pointless... --- lib/unicorn.rb | 2 +- lib/unicorn/const.rb | 1 - lib/unicorn/http_request.rb | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/unicorn.rb b/lib/unicorn.rb index 295327b..1cc814a 100644 --- a/lib/unicorn.rb +++ b/lib/unicorn.rb @@ -109,7 +109,7 @@ module Unicorn raise "No REQUEST PATH" if !params[Const::REQUEST_PATH] params[Const::PATH_INFO] = params[Const::REQUEST_PATH] - params[Const::SCRIPT_NAME] = Const::SLASH + params[Const::SCRIPT_NAME] = "" # From http://www.ietf.org/rfc/rfc3875 : # "Script authors should be aware that the REMOTE_ADDR and REMOTE_HOST diff --git a/lib/unicorn/const.rb b/lib/unicorn/const.rb index 8e52d4b..7c236c6 100644 --- a/lib/unicorn/const.rb +++ b/lib/unicorn/const.rb @@ -100,7 +100,6 @@ module Unicorn CONTENT_TYPE = "Content-Type".freeze LAST_MODIFIED = "Last-Modified".freeze ETAG = "ETag".freeze - SLASH = "/".freeze REQUEST_METHOD="REQUEST_METHOD".freeze GET="GET".freeze HEAD="HEAD".freeze diff --git a/lib/unicorn/http_request.rb b/lib/unicorn/http_request.rb index 57cf16b..7a95ee5 100644 --- a/lib/unicorn/http_request.rb +++ b/lib/unicorn/http_request.rb @@ -48,7 +48,6 @@ module Unicorn env["QUERY_STRING"] ||= '' env.delete "HTTP_CONTENT_TYPE" env.delete "HTTP_CONTENT_LENGTH" - env["SCRIPT_NAME"] = "" if env["SCRIPT_NAME"] == "/" env.update({"rack.version" => [0,1], "rack.input" => @body, "rack.errors" => STDERR, -- cgit v1.2.3-24-ge0c7