Updated Branches:
  refs/heads/master 24969fba7 -> bc3f9bc72

CB-1411: Add trustAllHosts option to FileTransfer.download on Android


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/commit/bc3f9bc7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/tree/bc3f9bc7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/diff/bc3f9bc7

Branch: refs/heads/master
Commit: bc3f9bc7256d1026788e20580ce751f9c720ac82
Parents: 24969fb
Author: Simon MacDonald <simon.macdon...@gmail.com>
Authored: Thu Sep 20 13:45:47 2012 -0400
Committer: Simon MacDonald <simon.macdon...@gmail.com>
Committed: Thu Sep 20 13:45:47 2012 -0400

----------------------------------------------------------------------
 lib/common/plugin/FileTransfer.js |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/bc3f9bc7/lib/common/plugin/FileTransfer.js
----------------------------------------------------------------------
diff --git a/lib/common/plugin/FileTransfer.js 
b/lib/common/plugin/FileTransfer.js
index 2c076c8..23430ee 100644
--- a/lib/common/plugin/FileTransfer.js
+++ b/lib/common/plugin/FileTransfer.js
@@ -78,8 +78,9 @@ FileTransfer.prototype.upload = function(filePath, server, 
successCallback, erro
  * @param target {String}         Full path of the file on the device
  * @param successCallback (Function}  Callback to be invoked when upload has 
completed
  * @param errorCallback {Function}    Callback to be invoked upon error
+ * @param trustAllHosts {Boolean} Optional trust all hosts (e.g. for 
self-signed certs), defaults to false
  */
-FileTransfer.prototype.download = function(source, target, successCallback, 
errorCallback) {
+FileTransfer.prototype.download = function(source, target, successCallback, 
errorCallback, trustAllHosts) {
     // sanity parameter checking
     if (!source || !target) throw new Error("FileTransfer.download requires 
source URI and target URI parameters at the minimum.");
     var win = function(result) {
@@ -102,7 +103,7 @@ FileTransfer.prototype.download = function(source, target, 
successCallback, erro
         errorCallback(error);
     };
 
-    exec(win, errorCallback, 'FileTransfer', 'download', [source, target]);
+    exec(win, errorCallback, 'FileTransfer', 'download', [source, target, 
trustAllHosts]);
 };
 
 module.exports = FileTransfer;

Reply via email to