File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
client/src/main/java/org/asynchttpclient/request/body/multipart/part Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,9 @@ protected long transferContentTo(ByteBuf target) throws IOException {
59
59
60
60
@ Override
61
61
protected long transferContentTo (WritableByteChannel target ) throws IOException {
62
- long transferred = channel .transferTo (channel .position (), BodyChunkedInput .DEFAULT_CHUNK_SIZE , target );
62
+ // WARN: don't use channel.position(), it's always 0 here
63
+ // from FileChannel javadoc: "This method does not modify this channel's position."
64
+ long transferred = channel .transferTo (position , BodyChunkedInput .DEFAULT_CHUNK_SIZE , target );
63
65
position += transferred ;
64
66
if (position == length ) {
65
67
state = MultipartState .POST_CONTENT ;
You can’t perform that action at this time.
0 commit comments