diff options
Diffstat (limited to 'lib/rack/handler')
-rw-r--r-- | lib/rack/handler/fastcgi.rb | 3 | ||||
-rw-r--r-- | lib/rack/handler/mongrel.rb | 3 | ||||
-rw-r--r-- | lib/rack/handler/webrick.rb | 4 |
3 files changed, 3 insertions, 7 deletions
diff --git a/lib/rack/handler/fastcgi.rb b/lib/rack/handler/fastcgi.rb index 1739d659..d8301474 100644 --- a/lib/rack/handler/fastcgi.rb +++ b/lib/rack/handler/fastcgi.rb @@ -33,7 +33,7 @@ module Rack env.delete "HTTP_CONTENT_LENGTH" env["SCRIPT_NAME"] = "" if env["SCRIPT_NAME"] == "/" - + rack_input = RewindableInput.new(request.in) env.update({"rack.version" => [1,0], @@ -50,7 +50,6 @@ module Rack env["QUERY_STRING"] ||= "" env["HTTP_VERSION"] ||= env["SERVER_PROTOCOL"] env["REQUEST_PATH"] ||= "/" - env.delete "PATH_INFO" if env["PATH_INFO"] == "" env.delete "CONTENT_TYPE" if env["CONTENT_TYPE"] == "" env.delete "CONTENT_LENGTH" if env["CONTENT_LENGTH"] == "" diff --git a/lib/rack/handler/mongrel.rb b/lib/rack/handler/mongrel.rb index cd1af2de..21f9f134 100644 --- a/lib/rack/handler/mongrel.rb +++ b/lib/rack/handler/mongrel.rb @@ -14,7 +14,7 @@ module Rack options[:throttle] || 0, options[:timeout] || 60) # Acts like Rack::URLMap, utilizing Mongrel's own path finding methods. - # Use is similar to #run, replacing the app argument with a hash of + # Use is similar to #run, replacing the app argument with a hash of # { path=>app, ... } or an instance of Rack::URLMap. if options[:map] if app.is_a? Hash @@ -63,7 +63,6 @@ module Rack "rack.url_scheme" => "http", }) env["QUERY_STRING"] ||= "" - env.delete "PATH_INFO" if env["PATH_INFO"] == "" status, headers, body = @app.call(env) diff --git a/lib/rack/handler/webrick.rb b/lib/rack/handler/webrick.rb index 5b9ae740..43286113 100644 --- a/lib/rack/handler/webrick.rb +++ b/lib/rack/handler/webrick.rb @@ -40,9 +40,7 @@ module Rack env["HTTP_VERSION"] ||= env["SERVER_PROTOCOL"] env["QUERY_STRING"] ||= "" env["REQUEST_PATH"] ||= "/" - if env["PATH_INFO"] == "" - env.delete "PATH_INFO" - else + unless env["PATH_INFO"] == "" path, n = req.request_uri.path, env["SCRIPT_NAME"].length env["PATH_INFO"] = path[n, path.length-n] end |