[
https://issues.apache.org/jira/browse/CAMEL-15410?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen resolved CAMEL-15410.
---------------------------------
Resolution: Fixed
Lets leave it as this.
Adding support for plus as space for all the http components is tedious work.
We can look at this later if more Camel end users hit this problem with HTTP
servers.
> REST endpoint has inconsistent URL Encoding
> --------------------------------------------
>
> Key: CAMEL-15410
> URL: https://issues.apache.org/jira/browse/CAMEL-15410
> Project: Camel
> Issue Type: Bug
> Components: rest
> Affects Versions: 3.4.2
> Reporter: Kris Boutilier
> Assignee: Claus Ibsen
> Priority: Major
> Fix For: 3.10.0
>
>
> When passing query parameters to a REST producer the encoding behavior is
> inconsistent. Consider the following:
> {code:java}
> .to("rest:get:bw-web-api/v1/objects/employees?host=agresso&companyId=RD&select=personId,personName&disconnect=true")
> {code}
> The resulting request payload, as observed with Wireshark, is:
> {code:java}
> GET
> /bw-web-api/v1/objects/employees?companyId=RD&disconnect=true&select=personId%252CpersonName
> HTTP/1.1\r\n{code}
> Note that the comma has been double-encoded resulting in transmission of
> %252C instead of the expected %2C.
> If instead the problem string is passed as a parameter via a header, the
> comma is correctly encoded:
> {code:java}
> .setHeader("select", simple("personId,personName"))
> .to("rest:get:bw-web-api/v1/objects/employees?host=agresso&companyId=RD&select={select}&disconnect=true")
> {code}
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)