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 "Alexander Veit (JIRA)" <ji...@apache.org> on 2006/12/24 16:02:23 UTC
[jira] Updated: (WSCOMMONS-118) BoundaryDelimitedStream read(byte[]
b) only works with b.length == 1
[ http://issues.apache.org/jira/browse/WSCOMMONS-118?page=all ]
Alexander Veit updated WSCOMMONS-118:
-------------------------------------
Attachment: BoundaryDelimitedStreamTestCase.zip
> BoundaryDelimitedStream read(byte[] b) only works with b.length == 1
> --------------------------------------------------------------------
>
> Key: WSCOMMONS-118
> URL: http://issues.apache.org/jira/browse/WSCOMMONS-118
> Project: WS-Commons
> Issue Type: Bug
> Components: AXIOM
> Reporter: Holger Lange
> Attachments: BoundaryDelimitedStreamTestCase.zip
>
>
> With the current trunk the stream cannot be read correctly if b.length > 1. This patch seems to fix it:
> Index: .
> ===================================================================
> --- . (revision 469843)
> +++ . (working copy)
> @@ -262,7 +262,7 @@
> boundaryPos = boundaryPosition(readbuf, 0, readBufEnd);
> }
>
> - int bwritten = -1; // Number of bytes written.
> + int bwritten = 0; // Number of bytes written.
>
> // read and copy bytes in.
> do { // Always allow to have a boundary length left in the buffer.
> @@ -267,7 +267,6 @@
> // read and copy bytes in.
> do { // Always allow to have a boundary length left in the buffer.
>
> - bwritten = 0;
> int bcopy = Math.min(readBufEnd - readBufPos - boundaryBufLen,
> len - bwritten);
>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org