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

req.params not in correct order when use a * before #2617

Closed
ECP-Black opened this issue Apr 10, 2015 · 2 comments
Closed

req.params not in correct order when use a * before #2617

ECP-Black opened this issue Apr 10, 2015 · 2 comments
Assignees
Milestone

Comments

@ECP-Black
Copy link

Hello

i have a problem with the params in the url (express v 4.12.3):

var express = require('express');
var app = express();

app.get('*/test/:id/status', function (req, res) {
    res.send(req.params);
});
app.listen(3000);

When requesting with the url:
http://localhost:3000/a/b/d/test/theId/status

the output will be:

 { '0': 'theId', id: '/a/b/d' }

The wildcard will be assign to the param id.

Kind regards,
Dennis

@yigitozdemir
Copy link

I tested this issue too, with version 4.12.2, result is the same. Probably first * symbol makes url parser doing wrong, i'll try to check URL parser.

chrisinajar added a commit to chrisinajar/express that referenced this issue May 7, 2015
sparkida pushed a commit to sparkida/express that referenced this issue May 22, 2015
sparkida added a commit to sparkida/express that referenced this issue May 22, 2015
@dougwilson dougwilson self-assigned this Jun 19, 2015
@dougwilson dougwilson added this to the 4.13 milestone Jun 19, 2015
@dougwilson dougwilson mentioned this issue Jun 19, 2015
6 tasks
@dougwilson dougwilson removed this from the 4.13 milestone Jun 19, 2015
@dougwilson
Copy link
Contributor

We are having issues with the proposed fix if anyone wants to help out fixing the bug in path-to-regexp. Some details over at #2637 (comment)

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

No branches or pull requests

3 participants