urunni88 commented on code in PR #27787:
URL: https://github.com/apache/camel/pull/27787#discussion_r4267327327


##########
components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java:
##########
@@ -340,12 +347,29 @@ public void onDone(Exchange exchange1) {
     }
 
     private static void applyHeader(HttpUriRequest httpRequest, String key, 
List<String> multiValues, String prev) {
-        // add the value(s) as a http request header
+        // add the value(s) as http request header(s), one header line per 
value
+        if (multiValues != null) {
+            for (String value : multiValues) {
+                httpRequest.addHeader(key, value);
+            }
+        } else if (prev != null) {
+            httpRequest.addHeader(key, prev);
+        }
+    }
+
+    private static boolean isSentAsOneJoinedHeader(Object value) {
+        if (value instanceof Iterator || (value instanceof Iterable && !(value 
instanceof Collection))) {

Review Comment:
   Thanks, added Stream to isSentAsOneJoinedHeader, updated the comment, and 
added it to the upgrade guide sentence.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to