|
@@ -600,7 +600,11 @@ public class RNFetchBlobReq extends BroadcastReceiver implements Runnable {
|
600
|
600
|
if (responseBody != null) {
|
601
|
601
|
String responseBodyString = null;
|
602
|
602
|
try {
|
603
|
|
- responseBodyString = responseBody.string();
|
|
603
|
+ boolean isBufferDataExists = responseBody.source().buffer().size() > 0;
|
|
604
|
+ boolean isContentExists = responseBody.contentLength() > 0;
|
|
605
|
+ if (isBufferDataExists && isContentExists) {
|
|
606
|
+ responseBodyString = responseBody.string();
|
|
607
|
+ }
|
604
|
608
|
} catch(IOException exception) {
|
605
|
609
|
exception.printStackTrace();
|
606
|
610
|
}
|