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 507ec5ed6048 chore(components): use normalized charset in servlet
507ec5ed6048 is described below

commit 507ec5ed60487f6b8b8b2dc1d1d10723ab843e31
Author: Claus Ibsen <[email protected]>
AuthorDate: Mon Oct 6 19:08:00 2025 +0200

    chore(components): use normalized charset in servlet
---
 .../org/apache/camel/component/jetty/CamelContinuationServlet.java  | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git 
a/components/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/CamelContinuationServlet.java
 
b/components/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/CamelContinuationServlet.java
index 2697e1f6c482..dc75c455ddb7 100644
--- 
a/components/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/CamelContinuationServlet.java
+++ 
b/components/camel-jetty-common/src/main/java/org/apache/camel/component/jetty/CamelContinuationServlet.java
@@ -201,8 +201,10 @@ public class CamelContinuationServlet extends CamelServlet 
{
                 exchange.setProperty(Exchange.DISABLE_HTTP_STREAM_CACHE, 
Boolean.TRUE);
             }
 
-            String normalizedCharset = 
IOHelper.getCharsetNameFromContentType(contentType);
-            exchange.setProperty(ExchangePropertyKey.CHARSET_NAME, 
normalizedCharset);
+            if (contentType != null) {
+                String normalizedCharset = 
IOHelper.getCharsetNameFromContentType(contentType);
+                exchange.setProperty(ExchangePropertyKey.CHARSET_NAME, 
normalizedCharset);
+            }
 
             // reuse existing http message if pooled
             Message msg = exchange.getIn();

Reply via email to