Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit37fadf0

Browse files
committed
Handle empty bytes multipart,closeAsyncHttpClient#1089
1 parent87fde24 commit37fadf0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,12 @@ private int writeCurrentFile(ByteBuffer buffer) throws IOException {
225225

226226
privateintwriteCurrentBytes(ByteBufferbuffer,intlength)throwsIOException {
227227

228+
if (currentBytes.length ==0) {
229+
currentBytesPosition = -1;
230+
currentBytes =null;
231+
return0;
232+
}
233+
228234
intavailable =currentBytes.length -currentBytesPosition;
229235

230236
intwriteLength =Math.min(available,length);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp