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

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

     [ https://issues.apache.org/jira/browse/CAMEL-5938?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Willem Jiang resolved CAMEL-5938.
---------------------------------

       Resolution: Fixed
    Fix Version/s: 2.11.0
                   2.10.4
                   2.9.6

Applied the patch into trunk, camel-2.10.x and camel-2.9.x branches.
                
> 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
>            Assignee: Willem Jiang
>            Priority: Minor
>             Fix For: 2.9.6, 2.10.4, 2.11.0
>
>
> 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