fix: e2e test returns false positive due to test timing (request finished to early)

This commit is contained in:
Sefa Ilkimen
2021-03-24 06:54:59 +01:00
parent 81ba667e37
commit d7688b485d
2 changed files with 6 additions and 1 deletions
@@ -187,6 +187,11 @@ abstract class CordovaHttpBase implements Runnable {
request.part(name, fileNames.getString(i), types.getString(i), new ByteArrayInputStream(bytes));
}
}
// prevent sending malformed empty multipart requests (#372)
if (buffers.length == 0) {
request.contentType(HttpRequest.CONTENT_TYPE_FORM);
}
}
}