[ https://issues.apache.org/jira/browse/WSCOMMONS-386?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12654129#action_12654129 ]
Andreas Veithen commented on WSCOMMONS-386: ------------------------------------------- Fixed in trunk. > Exception thrown is not descriptive, if content-type missing boundary > parameter > ------------------------------------------------------------------------------- > > Key: WSCOMMONS-386 > URL: https://issues.apache.org/jira/browse/WSCOMMONS-386 > Project: WS-Commons > Issue Type: Bug > Components: AXIOM > Reporter: Michael Kaye > > Looking at org.apache.axiom.attachments.Attachments, if the contentType > supplied is something like: > contentType="multipart/mixed;boundary=BOUNDARY" > then the value of this.boundary will be "--BOUNDARY".getBytes(); > contentType="multipart/mixed" > then the value of this.boundary will be "--null".getBytes(); > This will cause the parser to skip the entire stream and a : > throw new OMException("Mime parts not found. Stream ended while searching for > the boundary"); exception will be thrown. > It would be useful if the code checked for a null boundary and threw a more > descriptive error -- the issue is not that the stream ended prematurely, nor > that there was no boundary, but that the boundary parameter was missing from > the ContentType. > This applies against 1.2.5 and 1.2.6 -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.