camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r1429707 - /camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConverters.java
Date Mon, 07 Jan 2013 08:45:57 GMT
Author: ningjiang
Date: Mon Jan  7 08:45:56 2013
New Revision: 1429707

URL: http://svn.apache.org/viewvc?rev=1429707&view=rev
Log:
CAMEL-5938 fix the issue of MailConverters fails with uppercase content type TEXT/PLAIN

Modified:
    camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConverters.java

Modified: camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConverters.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConverters.java?rev=1429707&r1=1429706&r2=1429707&view=diff
==============================================================================
--- camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConverters.java
(original)
+++ camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConverters.java
Mon Jan  7 08:45:56 2013
@@ -80,7 +80,7 @@ public final class MailConverters {
         int size = multipart.getCount();
         for (int i = 0; i < size; i++) {
             BodyPart part = multipart.getBodyPart(i);
-            if (part.getContentType().startsWith("text")) {
+            if (part.getContentType().toLowerCase().startsWith("text")) {
                 return part.getContent().toString();
             }
         }



Mime
View raw message