This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new 4c612980022 CAMEL-17792: Add documentation about the message headers 
(T-Z)
4c612980022 is described below

commit 4c6129800225efe575a2e8cefdf5781a5546be91
Author: Claus Ibsen <[email protected]>
AuthorDate: Mon Apr 11 07:36:21 2022 +0200

    CAMEL-17792: Add documentation about the message headers (T-Z)
---
 .../component/xmlsecurity/processor/XmlSignatureProcessor.java      | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git 
a/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/processor/XmlSignatureProcessor.java
 
b/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/processor/XmlSignatureProcessor.java
index 796103fde0f..eafb1f642ad 100644
--- 
a/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/processor/XmlSignatureProcessor.java
+++ 
b/components/camel-xmlsecurity/src/main/java/org/apache/camel/component/xmlsecurity/processor/XmlSignatureProcessor.java
@@ -102,7 +102,11 @@ public abstract class XmlSignatureProcessor implements 
Processor {
         if (getConfiguration().getClearHeaders() != null && 
getConfiguration().getClearHeaders()) {
             Map<String, Object> headers = message.getHeaders();
             for (Field f : XmlSignatureConstants.class.getFields()) {
-                
headers.remove(ObjectHelper.lookupConstantFieldValue(XmlSignatureConstants.class,
 f.getName()));
+                String key = 
ObjectHelper.lookupConstantFieldValue(XmlSignatureConstants.class, f.getName());
+                if (!XmlSignatureConstants.CHARSET_NAME.equals(key)) {
+                    // keep charset header
+                    headers.remove(key);
+                }
             }
         }
     }

Reply via email to