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
Losing params mapping on chained handler. #1050
Comments
Edit: this isn't really relevant, methinks. If I add
I would have thought that sanitizing the path would strip the trailing Any help would be appreciated. $5 says I'm just doing something foolish. |
Updated to handle the path sanitization issue, still produces the same result.
|
Apologies for the delayed reply - I've been OOO. It looks like the mapped params are being stomped on on redirects: https://github.com/restify/node-restify/blob/5.x/lib/server.js#L902 I don't have enough context to know why this is being done. @yunong? To get around this for now, your best bet is to simply copy the mapped params to another property prior to a redirect. |
FYI, we will be deprecating this "internal redirection" feature starting 5.x in favor of something a little more comprehensive. |
This sounds like it is resolved in the 5.x release. Closing this for now. If I have missed a nuance, please correct me and we can re-open ❤️ |
Sorry for the extra logging in here. Just trying to show, as simply as possible, the few things I'm using (body parser, named handlers, chained handlers) and the results I'm seeing.
Parameters are being mapped by bodyParser. When a route "nexts" to a different named route, the params are no longer mapped.
The text was updated successfully, but these errors were encountered: