You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi. Thanks for a great library. I'll preface this by stating that I am upgrading some VERY legacy code (restify v4 to v8) and such have had a world of pain in doing so.
Used appropriate template for the issue type
Searched both open and closed issues for duplicates of this issue
Title adequately and concisely reflects the feature or the bug
Restify Version: 8.5.1 Node.js Version: 14.16.1
Expected behaviour
My req.params should be populated on all routes.
Actual behaviour
My req.params is only populated on a single route.
Repro case
constrestify=require('restify')constserver=restify.createServer({})constechoParams=(name)=>(req,res,next)=>{res.send(JSON.stringify({params: req.params, name }))}server.get('/:width/:height/:mode/*',echoParams('mode'))server.get('/:width/:height/*',echoParams('both'))server.get('/:width/*',echoParams('width'))server.listen(1234,()=>{console.log('listen')})
It does not matter what order I register my routes in, I get the same behaviour:
I can't open an issue on find-my-way as this uses an extremely out of date version of it.
Are you willing and able to fix this?
Sure, if someone can point me in the right direction.
Double EDIT: I've abandoned restify because of this issue. I don't believe this package to be maintained or suitable anymore - express works just fine.
The text was updated successfully, but these errors were encountered:
Hi. Thanks for a great library. I'll preface this by stating that I am upgrading some VERY legacy code (restify v4 to v8) and such have had a world of pain in doing so.
Restify Version: 8.5.1
Node.js Version: 14.16.1
Expected behaviour
My
req.params
should be populated on all routes.Actual behaviour
My
req.params
is only populated on a single route.Repro case
It does not matter what order I register my routes in, I get the same behaviour:
Cause
I wish I knew.
EDIT: I looked at the code and dumped a ton of logging in there and can see the stuff returned here does not contain it either:
https://github.com/restify/node-restify/blob/master/lib/router.js#L84
I can't open an issue on find-my-way as this uses an extremely out of date version of it.
Are you willing and able to fix this?
Sure, if someone can point me in the right direction.
Double EDIT: I've abandoned restify because of this issue. I don't believe this package to be maintained or suitable anymore - express works just fine.
The text was updated successfully, but these errors were encountered: