You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by pu...@apache.org on 2012/04/20 23:33:30 UTC
[16/16] wp7 commit: Fixed filetransfer boundary without parameter.
Fixed filetransfer boundary without parameter.
Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/commit/7e0f1497
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/tree/7e0f1497
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/diff/7e0f1497
Branch: refs/heads/master
Commit: 7e0f149746be1969f95ca49ced2eb0b8c0fdd4fa
Parents: ed9bed9
Author: Takashi Okamoto <to...@gmail.com>
Authored: Thu Feb 2 12:13:04 2012 +0900
Committer: Takashi Okamoto <to...@gmail.com>
Committed: Thu Feb 2 12:13:04 2012 +0900
----------------------------------------------------------------------
framework/PhoneGap/Commands/FileTransfer.cs | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/blob/7e0f1497/framework/PhoneGap/Commands/FileTransfer.cs
----------------------------------------------------------------------
diff --git a/framework/PhoneGap/Commands/FileTransfer.cs b/framework/PhoneGap/Commands/FileTransfer.cs
index f4b1bf4..7035c51 100644
--- a/framework/PhoneGap/Commands/FileTransfer.cs
+++ b/framework/PhoneGap/Commands/FileTransfer.cs
@@ -256,6 +256,7 @@ namespace WP7GapClassLib.PhoneGap.Commands
string headerTemplate = "Content-Disposition: form-data; name=\"{0}\"; filename=\"{1}\"" + lineEnd + "Content-Type: {2}" + lineEnd + lineEnd;
string header = string.Format(headerTemplate, uploadOptions.FileKey, uploadOptions.FileName, uploadOptions.MimeType);
byte[] headerBytes = System.Text.Encoding.UTF8.GetBytes(header);
+ requestStream.Write(boundaryBytes, 0, boundaryBytes.Length);
requestStream.Write(headerBytes, 0, headerBytes.Length);
byte[] buffer = new byte[4096];
int bytesRead = 0;