You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2013/01/07 09:57:58 UTC

svn commit: r1429711 - in /camel/branches/camel-2.10.x: ./ components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConverters.java

Author: ningjiang
Date: Mon Jan  7 08:57:57 2013
New Revision: 1429711

URL: http://svn.apache.org/viewvc?rev=1429711&view=rev
Log:
 CAMEL-5938 fix the issue of MailConverters fails with uppercase content type TEXT/PLAIN
Merged revisions 1429707 via svnmerge from 
https://svn.apache.org/repos/asf/camel/trunk

........
  r1429707 | ningjiang | 2013-01-07 16:45:56 +0800 (Mon, 07 Jan 2013) | 1 line
  
  CAMEL-5938 fix the issue of MailConverters fails with uppercase content type TEXT/PLAIN
........

Modified:
    camel/branches/camel-2.10.x/   (props changed)
    camel/branches/camel-2.10.x/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConverters.java

Propchange: camel/branches/camel-2.10.x/
------------------------------------------------------------------------------
  Merged /camel/trunk:r1429707

Propchange: camel/branches/camel-2.10.x/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: camel/branches/camel-2.10.x/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConverters.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.10.x/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConverters.java?rev=1429711&r1=1429710&r2=1429711&view=diff
==============================================================================
--- camel/branches/camel-2.10.x/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConverters.java (original)
+++ camel/branches/camel-2.10.x/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConverters.java Mon Jan  7 08:57:57 2013
@@ -69,7 +69,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();
             }
         }