camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (CAMEL-9588) Query parameters are not URL-decoded in rest dsl
Date Thu, 11 Feb 2016 07:51:18 GMT

     [ https://issues.apache.org/jira/browse/CAMEL-9588?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Claus Ibsen resolved CAMEL-9588.
--------------------------------
    Resolution: Invalid
      Assignee: Claus Ibsen

You need to configure the component you use, eg netty4-http has an option urlDecodeHeaders

http://camel.apache.org/netty4-http

> Query parameters are not URL-decoded in rest dsl
> ------------------------------------------------
>
>                 Key: CAMEL-9588
>                 URL: https://issues.apache.org/jira/browse/CAMEL-9588
>             Project: Camel
>          Issue Type: Bug
>          Components: rest
>    Affects Versions: 2.16.2
>         Environment: Karaf 3.0.4, Java 1.8.0_66, Mac OS X 10.10.5, camel-netty-http4
>            Reporter: Matt Sicker
>            Assignee: Claus Ibsen
>
> Pretty much what it says in the subject, but here's some sample code:
> {code}
> rest("/").get("search")
>   .param()
>     .name("q")
>     .type(RestParamType.query)
>   .endParam()
>   .route()
>     .to("direct:search")
>   .endRest();
> from("direct:search").log("q = ${headers.q}");
> {code}
> Then I do GET /search?q=New%20York and it prints out "q = New%20York" instead of "q =
New York". When I use CXF, though, the query parameters are automatically decoded.
> This bug report may also apply to path params and such, but I came across this issue
while porting from CXF stubs to the rest dsl.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message