[
https://issues.apache.org/jira/browse/CAMEL-15370?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17172259#comment-17172259
]
Frank Denninger edited comment on CAMEL-15370 at 8/6/20, 11:19 AM:
-------------------------------------------------------------------
Hi [[email protected]]
as i already tried to state, i don't see a version working that leverages some
kind of "csv" syntax in the values that doesn't have a significant risk to
break for some consumer.
I appended a different version that uses a Map<String,List<String>> internally.
WebClient seems to supports List<String> directly as parameter, and expands it
as expected.
I dont see incompatiblities if the map contained only String. But will
introduce some further sideeffects/improvements like map with
Map<String,Integer> will also work (it causes classcast error in the current
version).
But i still prefer my original patch that removes the usage of map for the
querystring.
Regards Frank
was (Author: k5):
Hi [[email protected]]
as i already tried to state, i don't see a version working that leverages some
kind of "csv" syntax in the values that doesn't have a significant risk to
break for some consumer.
I appended a different version that uses a Map<String,List<String>> internally.
I dont see incompatiblities if the map contained only String. But will
introduce some further sideeffects/improvements like map with
Map<String,Integer> will also work (it causes classcast error in the current
version).
But i still prefer my original patch that removes the usage of map for the
querystring.
Regards Frank
> CxfRsProducer: All but last value of query parameter with multiple values are
> lost
> ----------------------------------------------------------------------------------
>
> Key: CAMEL-15370
> URL: https://issues.apache.org/jira/browse/CAMEL-15370
> Project: Camel
> Issue Type: Bug
> Components: came-cxf
> Affects Versions: 3.3.0
> Reporter: Frank Denninger
> Assignee: Freeman Yue Fang
> Priority: Major
> Fix For: 3.5.0
>
> Attachments: CAMEL-15370.patch, CAMEL-15370_Chandra.patch,
> camel_map_with_list (2).patch
>
>
> If using a query parameter name multiple times, only the last value is
> actually used.
>
> e.g. .to("cxfrs:[http://example.com/]") with Exchange value
> Exchange.HTTP_QUERY id=1&id=2 will call to example.com with id=2
>
> As far as i can tell the problem is caused by
> CxfRsProducer::getQueryParametersFromQueryString. In the method all query
> paramters are inserted in a map, and only the last use of a parameter name is
> preserved.
>
> One solution would be to insert the values directy into the client field,
> skipping the Map.
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)