@@ -15,10 +15,10 @@ public function __construct(RequestContext $context)
1515 $ this ->context = $ context ;
1616 }
1717
18- public function match ($ pathinfo )
18+ public function match ($ rawPathinfo )
1919 {
2020 $ allow = array ();
21- $ pathinfo = rawurldecode ($ pathinfo );
21+ $ pathinfo = rawurldecode ($ rawPathinfo );
2222 $ context = $ this ->context ;
2323 $ request = $ this ->request ;
2424
@@ -67,7 +67,7 @@ public function match($pathinfo)
6767 // baz3
6868 if ('/test/baz3 ' === rtrim ($ pathinfo , '/ ' )) {
6969 if (substr ($ pathinfo , -1 ) !== '/ ' ) {
70- return $ this ->redirect ($ pathinfo .'/ ' , 'baz3 ' );
70+ return $ this ->redirect ($ rawPathinfo .'/ ' , 'baz3 ' );
7171 }
7272
7373 return array ('_route ' => 'baz3 ' );
@@ -78,7 +78,7 @@ public function match($pathinfo)
7878 // baz4
7979 if (preg_match ('#^/test/(?P<foo>[^/]++)/?$#s ' , $ pathinfo , $ matches )) {
8080 if (substr ($ pathinfo , -1 ) !== '/ ' ) {
81- return $ this ->redirect ($ pathinfo .'/ ' , 'baz4 ' );
81+ return $ this ->redirect ($ rawPathinfo .'/ ' , 'baz4 ' );
8282 }
8383
8484 return $ this ->mergeDefaults (array_replace ($ matches , array ('_route ' => 'baz4 ' )), array ());
@@ -171,7 +171,7 @@ public function match($pathinfo)
171171 // hey
172172 if ('/multi/hey ' === rtrim ($ pathinfo , '/ ' )) {
173173 if (substr ($ pathinfo , -1 ) !== '/ ' ) {
174- return $ this ->redirect ($ pathinfo .'/ ' , 'hey ' );
174+ return $ this ->redirect ($ rawPathinfo .'/ ' , 'hey ' );
175175 }
176176
177177 return array ('_route ' => 'hey ' );
@@ -318,7 +318,7 @@ public function match($pathinfo)
318318 if ('/secure ' === $ pathinfo ) {
319319 $ requiredSchemes = array ( 'https ' => 0 ,);
320320 if (!isset ($ requiredSchemes [$ this ->context ->getScheme ()])) {
321- return $ this ->redirect ($ pathinfo , 'secure ' , key ($ requiredSchemes ));
321+ return $ this ->redirect ($ rawPathinfo , 'secure ' , key ($ requiredSchemes ));
322322 }
323323
324324 return array ('_route ' => 'secure ' );
@@ -328,7 +328,7 @@ public function match($pathinfo)
328328 if ('/nonsecure ' === $ pathinfo ) {
329329 $ requiredSchemes = array ( 'http ' => 0 ,);
330330 if (!isset ($ requiredSchemes [$ this ->context ->getScheme ()])) {
331- return $ this ->redirect ($ pathinfo , 'nonsecure ' , key ($ requiredSchemes ));
331+ return $ this ->redirect ($ rawPathinfo , 'nonsecure ' , key ($ requiredSchemes ));
332332 }
333333
334334 return array ('_route ' => 'nonsecure ' );
0 commit comments