oscerd opened a new pull request, #24406:
URL: https://github.com/apache/camel/pull/24406

   This aligns `MimeMultipartDataFormat` unmarshalling (`headersInline=true`) 
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.
   
   ### Background
   
   Previously `copyNonStandardHeaders()` copied every MIME header (except 
`Message-ID`, `MIME-Version`, `Content-Type`) straight into the message header 
map with no `HeaderFilterStrategy`. This is inconsistent with:
   
   - the camel-mail **consumer**, which applies `MailHeaderFilterStrategy` 
(extends `DefaultHeaderFilterStrategy`) and filters the `Camel*` namespace 
case-insensitively on the inbound direction;
   - the data format's own **marshal** path, where inline headers are only 
copied when they match an explicit `includeHeaders` pattern.
   
   ### Change
   
   `copyNonStandardHeaders()` now delegates to 
`DefaultHeaderFilterStrategy.applyFilterToExternalHeaders(...)`, so `Camel*` 
headers arriving in MIME content are filtered on the inbound path. Ordinary 
application headers (e.g. `X-...`) continue to pass through unchanged.
   
   - Added a unit test covering prefix + case-insensitive filtering and 
application-header passthrough.
   - Added a 4.22 upgrade-guide entry (potential behavior change).
   
   JIRA: https://issues.apache.org/jira/browse/CAMEL-23891
   
   ---
   🤖 Generated with [Claude Code](https://claude.com/claude-code) on behalf of 
Andrea Cosentino
   


-- 
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