[
https://issues.apache.org/jira/browse/CAMEL-27079?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Federico Mariani updated CAMEL-27079:
-------------------------------------
Fix Version/s: 4.24.0
> camel-core - removeHeaders/removeProperties: excludePattern is described as
> comma separated, and the Java exclude patterns are lost when the route is
> dumped
> ------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-27079
> URL: https://issues.apache.org/jira/browse/CAMEL-27079
> Project: Camel
> Issue Type: Bug
> Components: camel-core
> Reporter: Federico Mariani
> Assignee: Federico Mariani
> Priority: Minor
> Fix For: 4.24.0
>
>
> The {{excludePattern}} option of {{removeHeaders}} and {{removeProperties}}
> is described as "You can use comma to separate multiple patterns". It is one
> pattern (exact name, wildcard or regular expression), as decided in
> CAMEL-6445: a comma is not split, so this keeps nothing and removes all three
> headers:
> {code:xml}
> <removeHeaders pattern="*" excludePattern="header1,header3"/>
> {code}
> A regular expression works: {{excludePattern="header1|header3"}}.
> The exclude patterns given in Java are kept in a transient array only, so a
> route dumped as XML or YAML loses them:
> {code:java}
> from("direct:start")
> .removeHeaders("*", "header1", "header3")
> .to("mock:result");
> {code}
> is dumped as {{<removeHeaders pattern="*"/>}}, and the dumped route removes
> every header. One exclude pattern ({{removeHeaders("*", "keep")}}) is lost
> too.
> Expected: the description says how to keep several headers or properties (a
> regular expression such as {{header1|header3}}), and the model keeps the Java
> exclude patterns in {{excludePattern}}, combined into one pattern that
> matches the same names, so the dump keeps them.
> _Claude Code on behalf of Federico Mariani_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)