Hi I have created ticket https://issues.apache.org/jira/browse/CAMEL-4212
The problem we have is that the http related components in Camel does not support mapping to/from Camel Message Headers if there is HTTP parameters that have multiple values. For example if a HTTP GET is send with: http://someserver.com/foo=123&foo=456&bar=yes Then in the Camel Message, we have 2 headers as expected bar -> yes foo -> 456 But foo header only contains the last value. It should be foo -> [123, 456] I am working on a patch but the various 3rd party http frameworks we use: - Apache Http Client 3.1 - Apache Http Client 4.x - Jetty (both server and client) - Async Http Client Handles this a bit differently in their API. So there is needed a bit fiddle to get it mapped correctly. For example if you traverse the HTTP parameter names then those libraries often will traverse the same name multiple times if it has multiple values. In those case you need yourself to keep track on what to extract. So in the given example above, the libraries will traverse bar -> yes foo -> [123, 456] foo -> [123, 456] What we would like to do with Camel Messsage Headers is to map the above to bar -> yes foo -> java.util.List { 123, 456 } I will attach a patch on the JIRA ticket, then you can take a look and it may be easier to discuss how we should go about fixing/implementing this. -- Claus Ibsen ----------------- FuseSource Email: [email protected] Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/
