From ed4f50016ab0eab1ebbeac2fe1d0fd8712c7ee91 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 21 Apr 2009 11:14:39 -0700 Subject: Move absolute URI parsing into HTTP parser It's part of the HTTP/1.1 (rfc2616), so we might as well handle it in there and set PATH_INFO while we're at it. Also, make "OPTIONS *" test not fail Rack::Lint --- lib/unicorn/http_request.rb | 8 -------- 1 file changed, 8 deletions(-) (limited to 'lib') diff --git a/lib/unicorn/http_request.rb b/lib/unicorn/http_request.rb index a3a1d4d..c9c9503 100644 --- a/lib/unicorn/http_request.rb +++ b/lib/unicorn/http_request.rb @@ -1,5 +1,4 @@ require 'tempfile' -require 'uri' require 'stringio' # compiled extension @@ -129,13 +128,6 @@ module Unicorn # that client may be a proxy, gateway, or other intermediary # acting on behalf of the actual source client." @params[Const::REMOTE_ADDR] = socket.unicorn_peeraddr - - # It might be a dumbass full host request header - @params[Const::PATH_INFO] = ( - @params[Const::REQUEST_PATH] ||= - URI.parse(@params[Const::REQUEST_URI]).path) or - raise "No REQUEST_PATH" - @params[Const::QUERY_STRING] ||= '' @params[Const::RACK_INPUT] = @body @params.update(DEF_PARAMS) -- cgit v1.2.3-24-ge0c7