You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by "Michael Kaye (JIRA)" <ji...@apache.org> on 2008/09/18 20:44:44 UTC
[jira] Created: (WSCOMMONS-386) Exception thrown is not
descriptive, if content-type missing boundary parameter
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.
[jira] Resolved: (WSCOMMONS-386) Exception thrown is not
descriptive, if content-type missing boundary parameter
Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WSCOMMONS-386?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andreas Veithen resolved WSCOMMONS-386.
---------------------------------------
Resolution: Fixed
Assignee: Andreas Veithen
> 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
> Assignee: Andreas Veithen
>
> 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.
[jira] Commented: (WSCOMMONS-386) Exception thrown is not
descriptive, if content-type missing boundary parameter
Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
[ 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.