Skip to content

Commit

Permalink
PATH_INFO must contain the virtual location, according to the Rack-spec
Browse files Browse the repository at this point in the history
  • Loading branch information
judofyr committed Jun 11, 2008
1 parent 4a94c07 commit 8465580
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/passenger/rack/request_handler.rb
Expand Up @@ -30,6 +30,7 @@ class RequestHandler < AbstractRequestHandler
RACK_RUN_ONCE = "rack.run_once" # :nodoc:
RACK_URL_SCHEME = "rack.url_scheme" # :nodoc:
SCRIPT_NAME = "SCRIPT_NAME" # :nodoc:
PATH_INFO = "PATH_INFO" # :nodoc:
HTTPS = "HTTPS" # :nodoc:
HTTPS_DOWNCASE = "https" # :nodoc:
HTTP = "http" # :nodoc:
Expand Down Expand Up @@ -76,6 +77,7 @@ def process_request(env, input, output)
env[RACK_MULTIPROCESS] = true
env[RACK_RUN_ONCE] = false
env[SCRIPT_NAME] ||= ''
env[PATH_INFO].sub!(/^#{Regexp.escape(env[SCRIPT_NAME])}/, "")
if env[HTTPS] == YES || env[HTTPS] == ON || env[HTTPS] == ONE
env[RACK_URL_SCHEME] = HTTPS_DOWNCASE
else
Expand Down

0 comments on commit 8465580

Please sign in to comment.