cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r1291146 - /cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSUtils.java
Date Mon, 20 Feb 2012 08:34:34 GMT
Author: ningjiang
Date: Mon Feb 20 08:34:34 2012
New Revision: 1291146

URL: http://svn.apache.org/viewvc?rev=1291146&view=rev
Log:
CXF-4120 JMS Transport content-type setting should be consistent with the HTTP one

Modified:
    cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSUtils.java

Modified: cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSUtils.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSUtils.java?rev=1291146&r1=1291145&r2=1291146&view=diff
==============================================================================
--- cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSUtils.java (original)
+++ cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSUtils.java Mon
Feb 20 08:34:34 2012
@@ -393,7 +393,8 @@ public final class JMSUtils {
         String enc = (String)message.get(org.apache.cxf.message.Message.ENCODING);
         // add the encoding information
         if (null != contentType) {
-            if (enc != null && contentType.indexOf("charset=") == -1) {
+            if (enc != null && contentType.indexOf("charset=") == -1
+                && !contentType.toLowerCase().contains("multipart/related")) {
                 contentType = contentType + "; charset=" + enc;
             }
         } else if (enc != null) {
@@ -428,7 +429,8 @@ public final class JMSUtils {
         String enc = (String)message.get(org.apache.cxf.message.Message.ENCODING);
         // add the encoding information
         if (null != contentType) {
-            if (enc != null && contentType.indexOf("charset=") == -1) {
+            if (enc != null && contentType.indexOf("charset=") == -1&& 
+                !contentType.toLowerCase().contains("multipart/related")) {
                 contentType = contentType + "; charset=" + enc;
             }
         } else if (enc != null) {



Mime
View raw message