# File lib/rack/urlmap.rb, line 37
37:     def call(env)
38:       path = env["PATH_INFO"]
39:       script_name = env['SCRIPT_NAME']
40:       hHost, sName, sPort = env.values_at('HTTP_HOST','SERVER_NAME','SERVER_PORT')
41:       @mapping.each { |host, location, match, app|
42:         next unless (hHost == host || sName == host \
43:           || (host.nil? && (hHost == sName || hHost == sName+':'+sPort)))
44:         next unless path.to_s =~ match && rest = $1
45:         next unless rest.empty? || rest[0] == ?/
46:         env.merge!('SCRIPT_NAME' => (script_name + location), 'PATH_INFO' => rest)
47:         return app.call(env)
48:       }
49:       [404, {"Content-Type" => "text/plain", "X-Cascade" => "pass"}, ["Not Found: #{path}"]]
50:     ensure
51:       env.merge! 'PATH_INFO' => path, 'SCRIPT_NAME' => script_name
52:     end