mirror of
https://github.com/apache/cordova-plugin-file-transfer.git
synced 2026-02-02 00:00:05 +08:00
CB-6000 Nginx rejects Content-Type without a space before "boundary".
From: https://github.com/apache/cordova-plugin-file-transfer/pull/6
This commit is contained in:
committed by
Andrew Grieve
parent
6f91ac3a30
commit
651460fb6b
@@ -315,7 +315,7 @@ public class FileTransfer extends CordovaPlugin {
|
||||
|
||||
// Use a post method.
|
||||
conn.setRequestMethod(httpMethod);
|
||||
conn.setRequestProperty("Content-Type", "multipart/form-data;boundary=" + BOUNDARY);
|
||||
conn.setRequestProperty("Content-Type", "multipart/form-data; boundary=" + BOUNDARY);
|
||||
|
||||
// Set the cookies on the response
|
||||
String cookie = CookieManager.getInstance().getCookie(target);
|
||||
|
||||
@@ -285,7 +285,7 @@ namespace WPCordovaClassLib.Cordova.Commands
|
||||
return;
|
||||
}
|
||||
webRequest = (HttpWebRequest)WebRequest.Create(serverUri);
|
||||
webRequest.ContentType = "multipart/form-data;boundary=" + Boundary;
|
||||
webRequest.ContentType = "multipart/form-data; boundary=" + Boundary;
|
||||
webRequest.Method = uploadOptions.Method;
|
||||
|
||||
if (!string.IsNullOrEmpty(uploadOptions.Headers))
|
||||
|
||||
Reference in New Issue
Block a user