From 4a9d4c85c3ad188d188104a7154d916aab079146 Mon Sep 17 00:00:00 2001 From: Larry Lv Date: Thu, 12 Jun 2014 14:15:29 +0800 Subject: Fix request's path_info when a rack app mounted at '/'. Fixes issue #15511. --- actionpack/lib/action_dispatch/journey/router.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'actionpack/lib/action_dispatch') diff --git a/actionpack/lib/action_dispatch/journey/router.rb b/actionpack/lib/action_dispatch/journey/router.rb index 74fa9ee3a2..fe3fc0a9fa 100644 --- a/actionpack/lib/action_dispatch/journey/router.rb +++ b/actionpack/lib/action_dispatch/journey/router.rb @@ -35,6 +35,7 @@ module ActionDispatch unless route.path.anchored req.script_name = (script_name.to_s + match.to_s).chomp('/') req.path_info = match.post_match + req.path_info = "/" + req.path_info unless req.path_info.start_with? "/" end req.path_parameters = set_params.merge parameters -- cgit v1.2.3