8000 [Routing] fixed several bugs and applied improvements by Tobion · Pull Request #3754 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Routing] fixed several bugs and applied improvements #3754

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter
8000

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
apply required changes caused by upstream
  • Loading branch information
Tobion committed Apr 11, 2012
commit d4f63d3a899eea8e7a5c80a2c607b307ca30eebd
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function __construct(RequestContext $context)
public function match($pathinfo)
{
$allow = array();
$pathinfo = urldecode($pathinfo);
$pathinfo = rawurldecode($pathinfo);

if (0 === strpos($pathinfo, '/rootprefix')) {
// static
Expand All @@ -32,7 +32,7 @@ public function match($pathinfo)
}

// dynamic
if (preg_match('#^/rootprefix/(?P<var>[^/]+?)$#xs', $pathinfo, $matches)) {
if (preg_match('#^/rootprefix/(?P<var>[^/]+?)$#s', $pathinfo, $matches)) {
$matches['_route'] = 'dynamic';
return $matches;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,15 +188,13 @@ public function getRouteCollections()
array('_scheme' => 'http')
));


/* test case 3 */

$rootprefixCollection = new RouteCollection();
$rootprefixCollection->add('static', new Route('/test'));
$rootprefixCollection->add('dynamic', new Route('/{var}'));
$rootprefixCollection->addPrefix('rootprefix');


return array(
array($collection, 'url_matcher1.php', array()),
array($redirectCollection, 'url_matcher2.php', array('base_class' => 'Symfony\Component\Routing\Tests\Fixtures\RedirectableUrlMatcher')),
Expand Down
0