summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVasu Nori <vnori@google.com>2010-10-29 13:31:09 -0700
committerVasu Nori <vnori@google.com>2010-10-29 13:56:02 -0700
commitc54d328a499ec0c35f73e5cf57169541e8bf1cd3 (patch)
tree583c4381bb7694b30dc8b74516c62cd1443d55e5 /src
parent23da30e29c15ac47aab3fa7ec7091d22dbf86177 (diff)
downloadpackages_apps_Browser-c54d328a499ec0c35f73e5cf57169541e8bf1cd3.zip
packages_apps_Browser-c54d328a499ec0c35f73e5cf57169541e8bf1cd3.tar.gz
packages_apps_Browser-c54d328a499ec0c35f73e5cf57169541e8bf1cd3.tar.bz2
set http header 'cookie' before inserting download request in DM
bug:3136154 Change-Id: Id1c7547293e3b3779fffd21cd73717db8f2c4a1b
Diffstat (limited to 'src')
-rw-r--r--src/com/android/browser/BrowserActivity.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/com/android/browser/BrowserActivity.java b/src/com/android/browser/BrowserActivity.java
index 2fe9e1b..4115b92 100644
--- a/src/com/android/browser/BrowserActivity.java
+++ b/src/com/android/browser/BrowserActivity.java
@@ -3218,12 +3218,13 @@ public class BrowserActivity extends Activity
request.setMimeType(mimetype);
request.setDestinationInExternalFilesDir(this, null, filename);
request.setDescription(webAddress.getHost());
+ String cookies = CookieManager.getInstance().getCookie(url);
+ request.addRequestHeader("cookie", cookies);
if (mimetype == null) {
ContentValues values = new ContentValues();
values.put(FetchUrlMimeType.URI, addressString);
// XXX: Have to use the old url since the cookies were stored using the
// old percent-encoded url.
- String cookies = CookieManager.getInstance().getCookie(url);
values.put(FetchUrlMimeType.COOKIE_DATA, cookies);
values.put(FetchUrlMimeType.USER_AGENT, userAgent);