We got nominated! Help us out and vote for GitHub as Best Bootstrapped Startup of 2008. (You can vote once a day.) [ hide ]

public
Description: Phusion Passenger (mod_rails)
Homepage: http://www.modrails.com/
Clone URL: git://github.com/FooBarWidget/passenger.git
Click here to lend your support to: passenger and make a donation at www.pledgie.com !
PATH_INFO must contain the virtual location, according to the Rack-spec
judofyr (author)
Wed Jun 11 02:47:50 -0700 2008
commit  84655802a21d1662fcd0203093fefc9dbf24ac41
tree    e4fdd23e0ef0d855a24bfd7a5fd610c04f89320e
parent  4a94c07b0ef0aa2f78ee750d812aa41f68e5107c
...
30
31
32
 
33
34
35
...
76
77
78
 
79
80
81
...
30
31
32
33
34
35
36
...
77
78
79
80
81
82
83
0
@@ -30,6 +30,7 @@ class RequestHandler < AbstractRequestHandler
0
   RACK_RUN_ONCE = "rack.run_once" # :nodoc:
0
   RACK_URL_SCHEME   = "rack.url_scheme" # :nodoc:
0
   SCRIPT_NAME = "SCRIPT_NAME" # :nodoc:
0
+ PATH_INFO = "PATH_INFO" # :nodoc:
0
   HTTPS = "HTTPS" # :nodoc:
0
   HTTPS_DOWNCASE = "https" # :nodoc:
0
   HTTP = "http" # :nodoc:
0
@@ -76,6 +77,7 @@ protected
0
     env[RACK_MULTIPROCESS] = true
0
     env[RACK_RUN_ONCE] = false
0
     env[SCRIPT_NAME] ||= ''
0
+ env[PATH_INFO].sub!(/^#{Regexp.escape(env[SCRIPT_NAME])}/, "")
0
     if env[HTTPS] == YES || env[HTTPS] == ON || env[HTTPS] == ONE
0
       env[RACK_URL_SCHEME] = HTTPS_DOWNCASE
0
     else

Comments

    No one has commented yet.