diff options
author | Larry Lv <larrylv1990@gmail.com> | 2014-06-12 14:15:29 +0800 |
---|---|---|
committer | Larry Lv <larrylv1990@gmail.com> | 2014-06-14 04:57:33 +0800 |
commit | 4a9d4c85c3ad188d188104a7154d916aab079146 (patch) | |
tree | 02591eb70b9b73f481f2288cef004a6f3fb544b1 /actionpack/lib/action_dispatch | |
parent | b0f07abbe385463cb03cfc890b85bb8ce3d5ccef (diff) | |
download | rails-4a9d4c85c3ad188d188104a7154d916aab079146.tar.gz rails-4a9d4c85c3ad188d188104a7154d916aab079146.tar.bz2 rails-4a9d4c85c3ad188d188104a7154d916aab079146.zip |
Fix request's path_info when a rack app mounted at '/'.
Fixes issue #15511.
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r-- | actionpack/lib/action_dispatch/journey/router.rb | 1 |
1 files changed, 1 insertions, 0 deletions
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 |