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

request.routeParams should be decoded #68

salomvary opened this issue Oct 29, 2013 · 3 comments

request.routeParams should be decoded #68

salomvary opened this issue Oct 29, 2013 · 3 comments


Copy link

@salomvary salomvary commented Oct 29, 2013

When requesting /hello%3Aworld?bar=hello%3Aworld

get("/:foo") { request =>
    request.routeParams.get("foo").get should equal("hello:world") // it's actually `hello%3Aworld`
    request.params.get("bar").get should equal("hello:world")


import org.jboss.netty.handler.codec.http.QueryStringDecoder
import org.jboss.netty.util.CharsetUtil

QueryStringDecoder.decodeComponent(param, CharsetUtil.UTF_8)
Copy link

@pcalcado pcalcado commented Oct 29, 2013

It seems like we are neither using Finagle's RequestParamMap nor replicating its logic for route params.

RequestParamMap seems a bit hard to extend properly, but I imagine that it would be good not to repeat the logic here. I am also not a big fan of router adding things to the request and having to care about this kind of encoding and etc.

I think I can get a fix for this...

Copy link

@turbolent turbolent commented Sep 14, 2016

It seems like when using a case class instead of Request and annotating a field with @RouteParam, it is still not properly decoded.

Copy link

@cacoco cacoco commented Sep 15, 2016

@turbolent this issue was filed against 1.x which is not relevant to 2.x. If you have an issue can you file a new one? Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants