Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

extract request allocation from the main app serving routine

  • Loading branch information...
commit aaceca625da4be9e192e3c29a85ff523390c58b6 1 parent 0735f8e
@tenderlove tenderlove authored
View
6 actionpack/lib/action_dispatch/journey/router.rb
@@ -31,9 +31,11 @@ def initialize(routes, options)
def call(env)
req = request_class.new(env)
-
req.path_info = Utils.normalize_path(req.path_info)
+ serve req
+ end
+ def serve(req)
find_routes(req).each do |match, parameters, route|
set_params = req.path_parameters
path_info = req.path_info
@@ -46,7 +48,7 @@ def call(env)
req.path_parameters = set_params.merge parameters
- status, headers, body = route.app.call(env)
+ status, headers, body = route.app.call(req.env)
if 'pass' == headers['X-Cascade']
req.script_name = script_name
View
1  actionpack/test/dispatch/routing_test.rb
@@ -3369,6 +3369,7 @@ def expected_redirect_body(url)
class TestAltApp < ActionDispatch::IntegrationTest
class AltRequest
attr_accessor :path_parameters, :path_info, :script_name
+ attr_reader :env
def initialize(env)
@path_parameters = {}
Please sign in to comment.
Something went wrong with that request. Please try again.