You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2021/03/25 12:41:00 UTC

[jira] [Assigned] (CAMEL-15410) REST endpoint has inconsistent URL Encoding

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

Claus Ibsen reassigned CAMEL-15410:
-----------------------------------

    Assignee: Claus Ibsen

> 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: Minor
>             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)