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

Mounts not sorted prior to searching #5

Open
oravecz opened this issue Feb 5, 2011 · 2 comments
Open

Mounts not sorted prior to searching #5

oravecz opened this issue Feb 5, 2011 · 2 comments

Comments

@oravecz
Copy link
Contributor

oravecz commented Feb 5, 2011

If I have the following two mounts defined:
app.mount('/', module.resolve('test1/config'));
app.mount('/test2', module.resolve('test2/config'));

The first one will always match the incoming url. It is probably best to sort the mounts by least specific prior to matching. Least specific in this case would be determined by the number of slashes in the spec.path. In the above example, the trailing slash is removed from all paths, so the first mount actually becomes "" and the second is "/test2".

@oravecz
Copy link
Contributor Author

oravecz commented Jun 21, 2011

Fixed by pull request

@oberhamsi
Copy link
Member

the pull branch is gone. did this really work? :) only for mount and not route? was it a good idea?

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