[
https://issues.apache.org/jira/browse/CAMEL-8049?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Willem Jiang resolved CAMEL-8049.
---------------------------------
Resolution: Fixed
Fix Version/s: 2.13.4
2.15.0
2.14.1
Applied the patch into camel master, camel-2.14.x and camel-2.13.x branches.
> 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
> Fix For: 2.14.1, 2.15.0, 2.13.4
>
> 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)