You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Bojan Tomic (JIRA)" <ji...@apache.org> on 2014/11/14 13:34:33 UTC

[jira] [Created] (CAMEL-8049) DefaultRestletBinding can not deal with multi-valued HTTP request parameters

Bojan Tomic created CAMEL-8049:
----------------------------------

             Summary: 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


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)