allthingssecurity commented on code in PR #27689:
URL: https://github.com/apache/camel/pull/27689#discussion_r4245779518
##########
components/camel-vertx/camel-vertx-http/src/main/java/org/apache/camel/component/vertx/http/DefaultVertxHttpBinding.java:
##########
@@ -138,7 +140,18 @@ public void populateRequestHeaders(
continue;
}
- if (!strategy.applyFilterToCamelHeaders(key, headerValue,
exchange)) {
+ if (headerValue instanceof Iterable || headerValue instanceof
Object[]) {
Review Comment:
Confirmed and fixed in ee2a700436af. With `instanceof Iterable` a
`JsonObject` header was sent as one `key=value`
header per entry and a `JsonArray` as one header per element; on main both
are one header with the JSON. The split is
now only for `java.util.Collection` and `Object[]`
(`HttpUtil.applyHeaderValue`, HttpUtil.java:258, called from
DefaultVertxHttpBinding.java:143). A `JsonArray` is deliberately kept as one
header with its JSON, as on main and as
you suggest; a route that wants one header per element sets a List.
New tests in `VertxHttpMultiValueHeaderTest`:
`sendsAJsonObjectHeaderAsItsJson`, `sendsAJsonArrayHeaderAsItsJson`,
`sendsAMapHeaderAsOneValue`. With the previous head (daec4bac0ad0) the first
two fail:
`expected: <{"a":"b","c":"d"}> but was: <a=b|c=d>` and `expected:
<["a","b"]> but was: <a|b>`. All three pass with
the binding of main, so nothing changes for these values compared with main.
_Claude Code on behalf of allthingssecurity_
--
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]