You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ni...@apache.org on 2015/05/05 18:53:17 UTC
cordova-plugin-file-transfer git commit: CB-8951 Fixed crash related
to headers parsing on wp8
Repository: cordova-plugin-file-transfer
Updated Branches:
refs/heads/master cd7eb26c7 -> e5c25b6bc
CB-8951 Fixed crash related to headers parsing on wp8
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/commit/e5c25b6b
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/tree/e5c25b6b
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/diff/e5c25b6b
Branch: refs/heads/master
Commit: e5c25b6bc7764b088585dcc2ee5831d131a1de2b
Parents: cd7eb26
Author: alsorokin <al...@akvelon.com>
Authored: Tue May 5 15:48:15 2015 +0300
Committer: alsorokin <al...@akvelon.com>
Committed: Tue May 5 15:48:15 2015 +0300
----------------------------------------------------------------------
src/wp/FileTransfer.cs | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer/blob/e5c25b6b/src/wp/FileTransfer.cs
----------------------------------------------------------------------
diff --git a/src/wp/FileTransfer.cs b/src/wp/FileTransfer.cs
index 7c29cfc..72f52fc 100644
--- a/src/wp/FileTransfer.cs
+++ b/src/wp/FileTransfer.cs
@@ -370,9 +370,12 @@ namespace WPCordovaClassLib.Cordova.Commands
if (!string.IsNullOrEmpty(uploadOptions.Headers))
{
Dictionary<string, string> headers = parseHeaders(uploadOptions.Headers);
- foreach (string key in headers.Keys)
+ if (headers != null)
{
- webRequest.Headers[key] = headers[key];
+ foreach (string key in headers.Keys)
+ {
+ webRequest.Headers[key] = headers[key];
+ }
}
}
@@ -566,9 +569,12 @@ namespace WPCordovaClassLib.Cordova.Commands
if (!string.IsNullOrEmpty(downloadOptions.Headers))
{
Dictionary<string, string> headers = parseHeaders(downloadOptions.Headers);
- foreach (string key in headers.Keys)
+ if (headers != null)
{
- webRequest.Headers[key] = headers[key];
+ foreach (string key in headers.Keys)
+ {
+ webRequest.Headers[key] = headers[key];
+ }
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org