davsclaus commented on code in PR #23652: URL: https://github.com/apache/camel/pull/23652#discussion_r3329936269
########## docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_21.adoc: ########## @@ -28,6 +28,21 @@ your own code or tooling, add `org.jspecify:jspecify` explicitly to your project The `org.apache.camel.support.DefaultHeaderFilterStrategy` changed default setting for lowercase from `false` to `true`. +The `DefaultHeaderFilterStrategy` now blocks headers whose names start with `Camel`, `camel`, or +`org.apache.camel` (case-insensitive) by default in both the inbound (external to Camel) and outbound +(Camel to external) directions. The `CAMEL_FILTER_STARTS_WITH` constant has been updated to include +`org.apache.camel`. Previously this required each component to explicitly call +`setInFilterStartsWith(CAMEL_FILTER_STARTS_WITH)` and `setOutFilterStartsWith(CAMEL_FILTER_STARTS_WITH)`. + +This affects anyone who: + +* Configures `DefaultHeaderFilterStrategy` directly, OR +* Extends `DefaultHeaderFilterStrategy` in a custom component without explicitly calling `setInFilterStartsWith` or `setOutFilterStartsWith`. + +If these headers need to pass through, opt out by calling `setInFilterStartsWith((String[]) null)` and/or +`setOutFilterStartsWith((String[]) null)`, or by supplying a custom filter array. Review Comment: Consider adding a note about the 6 deleted public header filter strategy classes — users with custom code that references them by name will get compilation errors: `CoAPHeaderFilterStrategy`, `CometdHeaderFilterStrategy`, `IggyHeaderFilterStrategy`, `NatsHeaderFilterStrategy`, `VertxWebsocketHeaderFilterStrategy`, `XmppHeaderFilterStrategy` They should be replaced with `new DefaultHeaderFilterStrategy()` which now provides the same behavior by default. -- 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]
