Skip to content

Commit e66b7ff

Browse files
author
Stephane Landelle
committed
MultipartBody doesn't account for byte[] size when handling a ByteArrayPartSource, close AsyncHttpClient#464
1 parent fb21db1 commit e66b7ff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/ning/http/multipart/MultipartBody.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ private long handlePartSource(WritableByteChannel target, FilePart filePart) thr
512512
if (nRead > 0) {
513513
ByteArrayOutputStream bos = new ByteArrayOutputStream(nRead);
514514
bos.write(bytes, 0, nRead);
515-
writeToTarget(target, bos.toByteArray());
515+
length += writeToTarget(target, bos.toByteArray());
516516
}
517517
}
518518
} finally {

0 commit comments

Comments
 (0)