Skip to content

Commit 656a244

Browse files
committed
Merge pull request android-async-http#414 from realxu/master
Wrong length calculated when uploading files, Closing android-async-http#332
2 parents ed6dc12 + bc6fd28 commit 656a244

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)