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