Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.14.0
-
None
-
Patch Available
-
Unknown
Description
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:
public void populateRestletRequestFromExchange(Request request, Exchange exchange) {
...
form.add(key, value.toString());
...
}
where the value is always treated as a String, even though it can be a Collection.
And similarly:
public void populateExchangeFromRestletRequest(Request request, Response response, Exchange exchange) throws Exception { ... for (Map.Entry<String, String> entry : form.getValuesMap().entrySet()) { ... } ... }
where getValuesMap() effectively disregards all duplicate key names.