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:
Christoph Neumann
2013-09-26 09:35:11 -05:00
committed by Andrew Grieve
parent 6f91ac3a30
commit 651460fb6b
2 changed files with 2 additions and 2 deletions

View File

@@ -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);

View File

@@ -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))