[
https://issues.apache.org/jira/browse/WSCOMMONS-100?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Andreas Veithen resolved WSCOMMONS-100.
---------------------------------------
Resolution: Fixed
Marking this issue as solved, since it is a duplicate of WSCOMMONS-245, which
has already been fixed.
> Can't recevie attachment part correctly
> ---------------------------------------
>
> Key: WSCOMMONS-100
> URL: https://issues.apache.org/jira/browse/WSCOMMONS-100
> Project: WS-Commons
> Issue Type: Bug
> Components: AXIOM
> Environment: All
> Reporter: Kazushi KANESHIRO
> Priority: Critical
> Attachments: test.zip
>
>
> My testprogram is failed to receive attachment part through
> BoundaryDelimitedStream.
>
> I look the source code of Class BoundaryDelimitedStream, I find doubtful
> part in the BoundaryDelimitedStream.java.
> This doubtful part is following.(BoundaryDelimitedStream.java : line 265-282)
> ///////////////////////////////////////////////////////////////////////////////////////////////////
> int bwritten = -1; // Number of bytes written.
> // 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);
> // never go past the boundary.
> bcopy = Math.min(bcopy, boundaryPos - readBufPos);
> if (bcopy > 0) {
> System.arraycopy(readbuf, readBufPos, b, off + bwritten,
> bcopy);
> bwritten += bcopy;
> readBufPos += bcopy;
> }
> ///////////////////////////////////////////////////////////////////////////////////////////////////
> I understand that variable bwritten is used for new writing position of
> buffer. (BoundaryDelimitedStream.java : line278-282)
> If my understanding is correct, I think variable bwritten must be keeping
> while do-while sentece is active.
> But, variable bwritten is substituted 0 each loop in the above code.
> (BoundaryDelimitedStream.java : line 270)
> Would you check this part in the source code?
> thanks.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.