We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 87fde24 commit 37fadf0Copy full SHA for 37fadf0
src/main/java/com/ning/http/client/multipart/MultipartBody.java
@@ -225,6 +225,12 @@ private int writeCurrentFile(ByteBuffer buffer) throws IOException {
225
226
private int writeCurrentBytes(ByteBuffer buffer, int length) throws IOException {
227
228
+ if (currentBytes.length == 0) {
229
+ currentBytesPosition = -1;
230
+ currentBytes = null;
231
+ return 0;
232
+ }
233
+
234
int available = currentBytes.length - currentBytesPosition;
235
236
int writeLength = Math.min(available, length);
0 commit comments