[
https://issues.apache.org/jira/browse/CAMEL-24453?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18109194#comment-18109194
]
Claus Ibsen commented on CAMEL-24453:
-------------------------------------
Fixed via https://github.com/apache/camel/pull/25831 (commit 126c79bdf3f1).
Resolving to sync JIRA status with the merged fix.
_Claude Code on behalf of Claus Ibsen_
> camel-platform-http - request-header echo suppression compares header names
> case-sensitively
> --------------------------------------------------------------------------------------------
>
> Key: CAMEL-24453
> URL: https://issues.apache.org/jira/browse/CAMEL-24453
> Project: Camel
> Issue Type: Bug
> Components: camel-platform-http
> Reporter: Andrea Cosentino
> Assignee: Andrea Cosentino
> Priority: Major
> Fix For: 4.23.0
>
>
> {{PlatformHttpEndpoint.enhanceHeaderFilterStrategyToSkipHttpRequestHeaders()}}
> wraps the endpoint's {{HeaderFilterStrategy}} so that request headers are
> not echoed back on the response. Its {{applyFilterToCamelHeaders}} returns
> true only when {{COMMON_HTTP_REQUEST_HEADERS.contains(headerName)}} - an
> exact-case lookup against a canonically capitalised set ({{"Authorization"}},
> {{"Cookie"}}, ...).
> Exchange headers keep the casing of the inbound request:
> {{VertxPlatformHttpConsumer}} populates them from the Vert.x {{MultiMap}} as
> received. HTTP/2 mandates lower-case field names, so on an HTTP/2 request the
> names are {{authorization}}, {{cookie}} and so on, none of which match the
> set. {{VertxPlatformHttpSupport.copyMessageHeadersToResponse}} then writes
> them to the response.
> The suppression therefore never fires for HTTP/2 traffic, and does not fire
> for any client that varies the casing.
> Proposal: compare case-insensitively - a {{TreeSet}} with
> {{String.CASE_INSENSITIVE_ORDER}}, or lower-case both sides at the lookup.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)