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 "Kazushi KANESHIRO (JIRA)" <ji...@apache.org> on 2006/09/20 04:53:23 UTC

[jira] Updated: (WSCOMMONS-100) Can't recevie attachment part correctly

     [ http://issues.apache.org/jira/browse/WSCOMMONS-100?page=all ]

Kazushi KANESHIRO updated WSCOMMONS-100:
----------------------------------------

    Attachment: test.zip

This attachedfile is  my testprogram.

Best regard.


> Can't recevie attachment part correctly
> ---------------------------------------
>
>                 Key: WSCOMMONS-100
>                 URL: http://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.
-
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