nette / routing

Nette Routing: two-ways URL conversion
https://doc.nette.org/routing
Other
231 stars 3 forks source link

withPath does not match path without ending slash #11

Closed MartkCz closed 11 months ago

MartkCz commented 2 years ago

Version: dev-master

Bug Description

Different behavior of matching path and path/

Steps To Reproduce

$list = new RouteList();
$list->withPath('admin')
    ->addRoute('[<presenter>]');
$list->addRoute('[<presenter>]');

var_dump($list->match(new Request(new UrlScript('http://localhost/admin/')))); // first route match
var_dump($list->match(new Request(new UrlScript('http://localhost/admin')))); // second route match

Expected Behavior

Both cases match first route