You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by bo...@apache.org on 2012/04/18 02:50:26 UTC
[2/2] android commit: CB-480 work,
back button and history issues are preventing this from being tested
properly
CB-480 work, back button and history issues are preventing this from being tested properly
Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/commit/76820eba
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/tree/76820eba
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/diff/76820eba
Branch: refs/heads/master
Commit: 76820ebafffcbd9652a6e600dbb2d56afb3ac4c9
Parents: c341cf0
Author: Joe Bowser <bo...@apache.org>
Authored: Tue Apr 17 17:13:33 2012 -0700
Committer: Joe Bowser <bo...@apache.org>
Committed: Tue Apr 17 17:13:33 2012 -0700
----------------------------------------------------------------------
framework/src/org/apache/cordova/FileTransfer.java | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/76820eba/framework/src/org/apache/cordova/FileTransfer.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/FileTransfer.java b/framework/src/org/apache/cordova/FileTransfer.java
index 649d3a8..315344b 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);