Skip to content
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

optimization in 5.31 break complex routes #709

Closed
powerman opened this issue Nov 17, 2014 · 1 comment
Closed

optimization in 5.31 break complex routes #709

powerman opened this issue Nov 17, 2014 · 1 comment

Comments

@powerman
Copy link

Problem is in this one-line change: 8e12216#diff-2650135fc08c671d8b875d9b8480f498L203

I expect these two definitions of routes to be equal (they make different routing tree but should work in same way):

app->routes->route("/a")->get("(*path)")->to(path=>undef);
app->routes->get("/a/(*path)")->to(path=>undef);

and they were equal up to 5.30, but since 5.31 they behave differently for "GET /a" request: route defined in first way return 404 since 5.31.

Example:

$ perl -Mojo -E 'app->routes->route("/a")->get("(*path)")->to(path=>undef,text=>"ok\n"); app->start' get /a | grep title
    <title>Page not found (development mode)</title>
$ perl -Mojo -E 'app->routes->get("/a/(*path)")->to(path=>undef,text=>"ok\n"); app->start' get /a
ok
@kraih kraih closed this as completed in 36f64ab Nov 17, 2014
@kraih
Copy link
Member

kraih commented Nov 17, 2014

Thanks, fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants