[
https://issues.apache.org/jira/browse/CAMEL-24424?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18112678#comment-18112678
]
Andrea Cosentino commented on CAMEL-24424:
------------------------------------------
Fixed via https://github.com/apache/camel/pull/26183 (merged to main as
5f58b90ff19e4360379e9dc5f611feedb294e9f7).
VertxHttpRestHeaderFilterStrategy now delegates to
super.applyFilterToCamelHeaders, matching the sibling REST strategies in
camel-http-common, camel-netty-http and camel-undertow. A sweep of every
super.applyFilterTo* call site across components/, core/ and dsl/ confirmed
vertx-http was the last remaining direction mismatch.
Covered by VertxHttpRestProducerHeaderFilterTest, which drives a rest:get
producer bound to vertx-http against an undertow test server and asserts what
reaches the wire, including that the request Content-Type still propagates.
_Claude Code on behalf of oscerd_
> camel-vertx-http - REST header filter strategy applies the inbound rules on
> the outbound direction
> --------------------------------------------------------------------------------------------------
>
> Key: CAMEL-24424
> URL: https://issues.apache.org/jira/browse/CAMEL-24424
> Project: Camel
> Issue Type: Bug
> Components: camel-vertx-http
> Reporter: Andrea Cosentino
> Assignee: Andrea Cosentino
> Priority: Major
> Fix For: 4.23.0
>
>
> VertxHttpRestHeaderFilterStrategy.applyFilterToCamelHeaders() delegates to
> the wrong super method:
> {code:java}
> @Override
> public boolean applyFilterToCamelHeaders(String headerName, Object
> headerValue, Exchange exchange) {
> boolean answer = super.applyFilterToExternalHeaders(headerName,
> headerValue, exchange);
> return filterCheck(templateUri, queryParameters, headerName, answer);
> }
> {code}
> It calls applyFilterToExternalHeaders (the inbound rules) while implementing
> applyFilterToCamelHeaders (the outbound direction), so the out-filter
> configured on the strategy never applies. The sibling REST strategies in
> camel-netty-http, camel-undertow and camel-http-common all call the matching
> super method.
> Proposal: call super.applyFilterToCamelHeaders(...), and add a test asserting
> that a header excluded on the outbound direction does not reach the wire.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)