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

Stefano Bagnara commented on MIME4J-53:
---------------------------------------

If we speak about well formed rfc822 messages then we should fail to parse 
messages with bad newlines (CR or LF alone). We don't do that now, so I thought 
that we want to be permissive during parsing.

We are in fact permissive wrt LF but not with CR (and I think this should be 
fixed).

Furthermore, as I just posted to the mailing list, mime4j currently apply a 
conversion from LF to CRLF for headers and for some of the structure of the 
message while it does not do this with the rest of the message: so we alter the 
message but we still output a malformed message: this seems plain wrong. IMHO 
either our goal is to leave the stream as is and output it as is, or our goal 
is to try to fix it and always output a well formed rfc822 message. Something 
in the middle is IMHO something unexpected.

I don't think this is critical for 0.4, but I think this should be discussed 
and the goal agreed.

> decoding a message including a base64 encoded rfc822 message with mixed 
> newlines result in parsing errors.
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: MIME4J-53
>                 URL: https://issues.apache.org/jira/browse/MIME4J-53
>             Project: Mime4j
>          Issue Type: Bug
>    Affects Versions: 0.4
>            Reporter: Stefano Bagnara
>             Fix For: 0.4
>
>
> I just committed bad-newlines-multiple-parts.msg and 
> bad-newlines-multiple-parts-base64.msg and respective expected output.
> The first is correctly decoded, the second is simply a base64 encoded rfc822 
> mime content of the first one and show the bad result.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to