From 76820ebafffcbd9652a6e600dbb2d56afb3ac4c9 Mon Sep 17 00:00:00 2001 From: Joe Bowser Date: Tue, 17 Apr 2012 17:13:33 -0700 Subject: [PATCH] CB-480 work, back button and history issues are preventing this from being tested properly --- framework/src/org/apache/cordova/FileTransfer.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/framework/src/org/apache/cordova/FileTransfer.java b/framework/src/org/apache/cordova/FileTransfer.java index 649d3a85..315344b5 100644 --- a/framework/src/org/apache/cordova/FileTransfer.java +++ b/framework/src/org/apache/cordova/FileTransfer.java @@ -421,6 +421,14 @@ public class FileTransfer extends Plugin { URL url = new URL(source); HttpURLConnection connection = (HttpURLConnection) url.openConnection(); connection.setRequestMethod("GET"); + + //Add cookie support + String cookie = CookieManager.getInstance().getCookie(source); + if(cookie != null) + { + connection.setRequestProperty("cookie", cookie); + } + connection.connect(); Log.d(LOG_TAG, "Download file:" + url);