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

support for matrix parameters when routing #2532

Closed
koulmomo opened this issue Feb 6, 2015 · 3 comments
Closed

support for matrix parameters when routing #2532

koulmomo opened this issue Feb 6, 2015 · 3 comments
Assignees
Labels

Comments

@koulmomo
Copy link

koulmomo commented Feb 6, 2015

Here is an issue on another project that has a nice explanation of what matrix parameters are as well as a StackOverflow question explaining their usefulness.
Only referencing them since I myself had only just recently learned about them.

I am not looking for a comprehensive solution to fully support matrix parameters in express (by perhaps aggregating them in a req.matrix object). For now I'd settle for a having the express routing support correctly matching paths with matrix params with their handlers.

The expected behavior I am hoping for:

using the app generated by the express-generator

/users;foo=bar should not 404 and instead map to the handler for /users

If there are absolutely no plans to support matrix parameters, it would be nice to have a warning or explicitly declaring it in the routing section of the docs.

Thanks!

@dougwilson
Copy link
Contributor

I doubt we would support this in the default router. This can very easily be implemented as a third-party router, though.

Asking us to list that "we don't support matrix routing" is not viable--if we list what types of routing we don't support, the list will be endless. Instead we list what we support, so if we don't say we support matrix routing, it means we don't support it.

If the third-party express router that supports matrix parameters get enough traction, then we can consider adding to core, but otherwise, it is much more suitable as a third-party router.

@dougwilson
Copy link
Contributor

I can always reconsider if someone submits an extremely well-tested implementation, preferably to the "router" module on npm, which express is switching to use.

@dougwilson
Copy link
Contributor

Any traction on creating a PR to here or (more preferred) the router npm module?

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

No branches or pull requests

2 participants