Skip to content

Commit bc6fd28

Browse files
committed
fix bug: upload more than 2 files in a single post request will be failed
1 parent cd1855f commit bc6fd28

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/src/main/java/com/loopj/android/http/SimpleMultipartEntity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ private byte[] createHeader(String key, String filename, String type) {
190190
}
191191

192192
public long getTotalLength() {
193-
long streamLength = file.length();
193+
long streamLength = file.length() + CR_LF.length;
194194
return header.length + streamLength;
195195
}
196196

0 commit comments

Comments
 (0)