mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-26 20:33:07 +08:00
CB-480 work, back button and history issues are preventing this from being tested properly
This commit is contained in:
parent
c341cf0d47
commit
76820ebaff
@ -421,6 +421,14 @@ public class FileTransfer extends Plugin {
|
|||||||
URL url = new URL(source);
|
URL url = new URL(source);
|
||||||
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
|
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
|
||||||
connection.setRequestMethod("GET");
|
connection.setRequestMethod("GET");
|
||||||
|
|
||||||
|
//Add cookie support
|
||||||
|
String cookie = CookieManager.getInstance().getCookie(source);
|
||||||
|
if(cookie != null)
|
||||||
|
{
|
||||||
|
connection.setRequestProperty("cookie", cookie);
|
||||||
|
}
|
||||||
|
|
||||||
connection.connect();
|
connection.connect();
|
||||||
|
|
||||||
Log.d(LOG_TAG, "Download file:" + url);
|
Log.d(LOG_TAG, "Download file:" + url);
|
||||||
|
Loading…
Reference in New Issue
Block a user