Skip to content
This repository was archived by the owner on Mar 16, 2019. It is now read-only.

Commit 3b58491

Browse files
committed
Change Android request builder, so that empty content-type will not changed to octet-stream #425
1 parent dd4dbb2 commit 3b58491

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

android/src/main/java/com/RNFetchBlob/RNFetchBlobReq.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,8 @@ else if (value.equalsIgnoreCase("utf8"))
238238
requestType = RequestType.Form;
239239
}
240240
else if(cType.isEmpty()) {
241-
builder.header("Content-Type", "application/octet-stream");
241+
if(!cType.equalsIgnoreCase(""))
242+
builder.header("Content-Type", "application/octet-stream");
242243
requestType = RequestType.SingleFile;
243244
}
244245
if(rawRequestBody != null) {

0 commit comments

Comments
 (0)