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

Willem Jiang reassigned CAMEL-8049:
-----------------------------------

    Assignee: Willem Jiang

> DefaultRestletBinding can not deal with multi-valued HTTP request parameters
> ----------------------------------------------------------------------------
>
>                 Key: CAMEL-8049
>                 URL: https://issues.apache.org/jira/browse/CAMEL-8049
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-restlet
>    Affects Versions: 2.14.0
>            Reporter: Bojan Tomic
>            Assignee: Willem Jiang
>         Attachments: DefaultRestletBinding.patch
>
>
> Multi-valued HTTP request parameters are a common practice yet, with the 
> provided binding, Camel Restlet component can not deal with them.
> In DefaultRestletBinding, we can see the following problematic code:
> {code}
> public void populateRestletRequestFromExchange(Request request, Exchange 
> exchange) {
> ...
>      form.add(key, value.toString());
> ...
> }
> {code}
> where the value is always treated as a String, even though it can be a 
> Collection.
> And similarly:
> {code}
> public void populateExchangeFromRestletRequest(Request request, Response 
> response, Exchange exchange) throws Exception {
> ...
>      for (Map.Entry<String, String> entry : form.getValuesMap().entrySet()) {
>           ...
>      }
> ...
> }
> {code}
> where getValuesMap() effectively disregards all duplicate key names.



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

Reply via email to