james-mime4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <mime4j-...@james.apache.org>
Subject [jira] [Commented] (MIME4J-259) MboxIterator does not handle EOL = CRLF
Date Thu, 09 Mar 2017 13:18:37 GMT

    [ https://issues.apache.org/jira/browse/MIME4J-259?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15903026#comment-15903026

Sebb commented on MIME4J-259:

As a short-term fix, the entries in FromLinePatterns could be changed to use "\r?\n" instead
of "$" and the code changed to drop the +1.

However I think it would be better to return the full chunk including the From_ line, as that
has potentially useful info.

> MboxIterator does not handle EOL = CRLF
> ---------------------------------------
>                 Key: MIME4J-259
>                 URL: https://issues.apache.org/jira/browse/MIME4J-259
>             Project: James Mime4j
>          Issue Type: Bug
>            Reporter: Sebb
> The MboxIterator class assumes that the EOL consists of a single character, so it increments
findEnd by 1 to get the start of the message.
> This causes problems for files which have a CRLF line ending, because the generated message
contains a leading LF which confuses the parser.
> The iterator should ensure that the entire EOL is skipped.
> However it might be better to keep the From_ line in the returned message.
> The parser can then process it to extract its data.

This message was sent by Atlassian JIRA

View raw message