microtan / nhin-d

Automatically exported from code.google.com/p/nhin-d
0 stars 0 forks source link

Wrapped Message detection does string comparison instead of deeper introspection of content-type #208

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Messages that have multiple header content-types indicating a wrapped message 
will not be detected as wrapped due to insufficient comparison.

The code below shows that only a one-to-one string matching is executing to 
check for message/rfc822 when this content-type header can actually be multiple 
lines with other content such as char-set.

public static boolean isWrapped(Message message)
    {
        if (message == null)
            return false;   

        try
        {           
            return message.getContentType().equalsIgnoreCase(MailStandard.MediaType.WrappedMessage);
        }
        catch (MessagingException e) {/* no-op */}

        return false;
    }

Original issue reported on code.google.com by BrianCHo...@gmail.com on 12 Mar 2013 at 5:32

GoogleCodeExporter commented 9 years ago
Committed.

Original comment by gm2...@cerner.com on 19 Mar 2013 at 1:48