mirror of
https://github.com/silkimen/cordova-plugin-advanced-http.git
synced 2026-05-12 00:03:02 +08:00
fix: #372 [Bug] Android: malformed empty multipart requests
This commit is contained in:
@@ -189,8 +189,9 @@ abstract class CordovaHttpBase implements Runnable {
|
||||
}
|
||||
|
||||
// prevent sending malformed empty multipart requests (#372)
|
||||
if (buffers.length == 0) {
|
||||
request.contentType(HttpRequest.CONTENT_TYPE_FORM);
|
||||
if (buffers.length() == 0) {
|
||||
request.contentType("multipart/form-data; boundary=00content0boundary00");
|
||||
request.send("\r\n--00content0boundary00--\r\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user