camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Axel Roeber (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CAMEL-5938) MailConverters fails with uppercase content type TEXT/PLAIN
Date Mon, 07 Jan 2013 07:32:12 GMT
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

Mime
View raw message