Skip to content

[backport camel-4.18.x] CAMEL-23891: camel-mail - filter Camel internal headers in MimeMultipartDataFormat unmarshal#24409

Open
oscerd wants to merge 1 commit into
apache:camel-4.18.xfrom
oscerd:backport/24406-to-camel-4.18.x
Open

[backport camel-4.18.x] CAMEL-23891: camel-mail - filter Camel internal headers in MimeMultipartDataFormat unmarshal#24409
oscerd wants to merge 1 commit into
apache:camel-4.18.xfrom
oscerd:backport/24406-to-camel-4.18.x

Conversation

@oscerd

@oscerd oscerd commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Backport of #24406

Cherry-pick of #24406 onto camel-4.18.x (targeting the 4.18.4 release).

Original PR: #24406CAMEL-23891: camel-mail - filter Camel internal headers in MimeMultipartDataFormat unmarshal
Original author: @oscerd
Target branch: camel-4.18.x

What changed

MimeMultipartDataFormat unmarshalling (headersInline=true) now aligns with the camel-mail consumer: internal Camel headers (Camel*, matched case-insensitively) present in the external MIME headers are no longer copied verbatim onto the Camel message. Ordinary application headers (e.g. X-...) continue to pass through unchanged.

copyNonStandardHeaders() delegates to DefaultHeaderFilterStrategy.applyFilterToExternalHeaders(...) on the inbound path, consistent with the MailHeaderFilterStrategy already applied by the consumer.

Backport notes

  • Code + unit test cherry-picked from the merged commit; verified to apply cleanly on camel-4.18.x (the HeaderFilterStrategy SPI and the direct:unmarshalonlyinlineheaders test route already exist on the branch).
  • The upgrade-guide entry is intentionally not included here: per project policy the upgrade-guide history is canonical on main (the camel-4x-upgrade-guide-4_22.adoc note lives on main; the 4.18-line note is handled as a separate doc-sync on main).

JIRA: https://issues.apache.org/jira/browse/CAMEL-23891

🤖 Generated with Claude Code on behalf of Andrea Cosentino

…artDataFormat unmarshal (apache#24406)

Signed-off-by: Andrea Cosentino <ancosen@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@oscerd oscerd added the backport indicate that a Pull request is a backport from a fix from the main branch label Jul 3, 2026
@oscerd oscerd requested review from davsclaus and orpiske July 3, 2026 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport indicate that a Pull request is a backport from a fix from the main branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants