You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mime4j-dev@james.apache.org by "Stefano Bagnara (JIRA)" <mi...@james.apache.org> on 2009/12/30 14:21:29 UTC
[jira] Created: (MIME4J-152) Zero parts multipart messages are
parsed as 1 empty part multipart messages
Zero parts multipart messages are parsed as 1 empty part multipart messages
---------------------------------------------------------------------------
Key: MIME4J-152
URL: https://issues.apache.org/jira/browse/MIME4J-152
Project: JAMES Mime4j
Issue Type: Bug
Affects Versions: 0.6
Reporter: Stefano Bagnara
Assignee: Stefano Bagnara
Priority: Minor
Fix For: 0.8
Attachments: testmsgs-missingboundaries.zip
Mime4j currenlty parse a message having only the start boundary as an empty message (zero parts) but at the same time parse a message with no boundary (no start and no end) as a message with 1 empty part.
This is clearly wrong.
We also already have a missing-inner-boundary.msg in our testsuite but the expectation files are wrong.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (MIME4J-152) Zero parts multipart messages are
parsed as 1 empty part multipart messages
Posted by "Stefano Bagnara (JIRA)" <mi...@james.apache.org>.
[ https://issues.apache.org/jira/browse/MIME4J-152?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12795309#action_12795309 ]
Stefano Bagnara commented on MIME4J-152:
----------------------------------------
It seems we can remove T_IN_MESSAGE and T_IN_BODYPART states and simply EntityStates.T_BODY (instead of T_IN_MESSAGE) and EntityStates.T_PREAMBLE (instead of T_IN_BODYPART). At least this work fine in my uncommitted code.
> Zero parts multipart messages are parsed as 1 empty part multipart messages
> ---------------------------------------------------------------------------
>
> Key: MIME4J-152
> URL: https://issues.apache.org/jira/browse/MIME4J-152
> Project: JAMES Mime4j
> Issue Type: Bug
> Affects Versions: 0.6
> Reporter: Stefano Bagnara
> Assignee: Stefano Bagnara
> Priority: Minor
> Fix For: 0.8
>
> Attachments: testmsgs-missingboundaries.zip
>
>
> Mime4j currenlty parse a message having only the start boundary as an empty message (zero parts) but at the same time parse a message with no boundary (no start and no end) as a message with 1 empty part.
> This is clearly wrong.
> We also already have a missing-inner-boundary.msg in our testsuite but the expectation files are wrong.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (MIME4J-152) Zero parts multipart messages are
parsed as 1 empty part multipart messages
Posted by "Stefano Bagnara (JIRA)" <mi...@james.apache.org>.
[ https://issues.apache.org/jira/browse/MIME4J-152?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stefano Bagnara resolved MIME4J-152.
------------------------------------
Resolution: Fixed
Merged from cycleclean.
> Zero parts multipart messages are parsed as 1 empty part multipart messages
> ---------------------------------------------------------------------------
>
> Key: MIME4J-152
> URL: https://issues.apache.org/jira/browse/MIME4J-152
> Project: JAMES Mime4j
> Issue Type: Bug
> Affects Versions: 0.6
> Reporter: Stefano Bagnara
> Assignee: Stefano Bagnara
> Priority: Minor
> Fix For: 0.7
>
> Attachments: testmsgs-missingboundaries.zip
>
>
> Mime4j currenlty parse a message having only the start boundary as an empty message (zero parts) but at the same time parse a message with no boundary (no start and no end) as a message with 1 empty part.
> This is clearly wrong.
> We also already have a missing-inner-boundary.msg in our testsuite but the expectation files are wrong.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (MIME4J-152) Zero parts multipart messages are
parsed as 1 empty part multipart messages
Posted by "Stefano Bagnara (JIRA)" <mi...@james.apache.org>.
[ https://issues.apache.org/jira/browse/MIME4J-152?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12795307#action_12795307 ]
Stefano Bagnara commented on MIME4J-152:
----------------------------------------
It seems MimeEntity have very similar code for EntityStates.T_PREAMBLE and T_IN_BODYPART states.
Analyzing the minor differences (trying to clean up code) I found out this bug.
It can be easily solved by remove any code from T_PREABLE and leave the switch/case fallback to T_IN_BODYPART.
case EntityStates.T_PREAMBLE:
// removed specific code. Fallback to T_IN_BODYPART that
// better handle missing parts.
case T_IN_BODYPART:
(PS: maybe we don't need the T_IN_BODYPART state anymore and we could use the T_PREABLE instead..)
> Zero parts multipart messages are parsed as 1 empty part multipart messages
> ---------------------------------------------------------------------------
>
> Key: MIME4J-152
> URL: https://issues.apache.org/jira/browse/MIME4J-152
> Project: JAMES Mime4j
> Issue Type: Bug
> Affects Versions: 0.6
> Reporter: Stefano Bagnara
> Assignee: Stefano Bagnara
> Priority: Minor
> Fix For: 0.8
>
> Attachments: testmsgs-missingboundaries.zip
>
>
> Mime4j currenlty parse a message having only the start boundary as an empty message (zero parts) but at the same time parse a message with no boundary (no start and no end) as a message with 1 empty part.
> This is clearly wrong.
> We also already have a missing-inner-boundary.msg in our testsuite but the expectation files are wrong.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (MIME4J-152) Zero parts multipart messages are
parsed as 1 empty part multipart messages
Posted by "Stefano Bagnara (JIRA)" <mi...@james.apache.org>.
[ https://issues.apache.org/jira/browse/MIME4J-152?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stefano Bagnara updated MIME4J-152:
-----------------------------------
Attachment: testmsgs-missingboundaries.zip
The original test with fixed expected results, and 2 new test messages to prove different scenarios and prove the previous inconsistency.
> Zero parts multipart messages are parsed as 1 empty part multipart messages
> ---------------------------------------------------------------------------
>
> Key: MIME4J-152
> URL: https://issues.apache.org/jira/browse/MIME4J-152
> Project: JAMES Mime4j
> Issue Type: Bug
> Affects Versions: 0.6
> Reporter: Stefano Bagnara
> Assignee: Stefano Bagnara
> Priority: Minor
> Fix For: 0.8
>
> Attachments: testmsgs-missingboundaries.zip
>
>
> Mime4j currenlty parse a message having only the start boundary as an empty message (zero parts) but at the same time parse a message with no boundary (no start and no end) as a message with 1 empty part.
> This is clearly wrong.
> We also already have a missing-inner-boundary.msg in our testsuite but the expectation files are wrong.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.