You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Axel Roeber (JIRA)" <ji...@apache.org> on 2013/01/07 08:32:12 UTC

[jira] [Created] (CAMEL-5938) MailConverters fails with uppercase content type TEXT/PLAIN

Axel Roeber created CAMEL-5938:
----------------------------------

             Summary: MailConverters fails with uppercase content type TEXT/PLAIN
                 Key: CAMEL-5938
                 URL: https://issues.apache.org/jira/browse/CAMEL-5938
             Project: Camel
          Issue Type: Improvement
          Components: camel-mail
    Affects Versions: 2.10.3
            Reporter: Axel Roeber
            Priority: Minor


Some email clients produce uppercase content types. Therefore converting the body to a String fails:

TRACE [Camel - imaps://...] org.apache.camel.component.mail.MailBinding: Part #0: ContentType: TEXT/PLAIN; charset=utf-8

INFO  [Camel - imaps://...] de.ordix: Exchange[ExchangePattern:InOnly, BodyType:javax.mail.internet.MimeMultipart, Body:javax.mail.internet.MimeMultipart@1d8c8b4]

MailConverters.java (line 72)
if (part.getContentType().startsWith("text")) {

should also handle uppercase types. Best solution solution would be to ignore case e. g. by using (spring-core's) StringUtils.startsWithIgnoreCase.

also pls see forum:
http://camel.465427.n5.nabble.com/MailConverters-fails-with-uppercase-content-type-TEXT-PLAIN-td5724938.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira