From aaceca625da4be9e192e3c29a85ff523390c58b6 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Fri, 23 May 2014 10:25:26 -0700 Subject: extract request allocation from the main app serving routine --- actionpack/lib/action_dispatch/journey/router.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'actionpack/lib') diff --git a/actionpack/lib/action_dispatch/journey/router.rb b/actionpack/lib/action_dispatch/journey/router.rb index 1632c4490d..d64d0923e9 100644 --- a/actionpack/lib/action_dispatch/journey/router.rb +++ b/actionpack/lib/action_dispatch/journey/router.rb @@ -31,9 +31,11 @@ module ActionDispatch 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 @@ module ActionDispatch 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 -- cgit v1.2.3