diff options
author | Patrik Stenkilsson <patrik.stenkilsson@sonyericsson.com> | 2012-02-14 09:33:24 +0100 |
---|---|---|
committer | Henrik Baard <henrik.baard@sonymobile.com> | 2012-03-18 10:48:37 +0100 |
commit | d0fc5898276ba5a02c7b8761065040d0a545cac4 (patch) | |
tree | 3685504b613733b49798c96329ca3efe834e11e2 /src/com/android/browser/DownloadHandler.java | |
parent | c40c9c23bc3098307d8fd7524933724a1b8e29d5 (diff) | |
download | packages_apps_Browser-d0fc5898276ba5a02c7b8761065040d0a545cac4.zip packages_apps_Browser-d0fc5898276ba5a02c7b8761065040d0a545cac4.tar.gz packages_apps_Browser-d0fc5898276ba5a02c7b8761065040d0a545cac4.tar.bz2 |
UserAgent not propagated from Browser to DownloadProvider
Browser does not propagate the userAgent to DownloadProvider
for downloads. When downloads are started the default userAgent
in DownloadProvider is used instead of using the userAgent of
the Browser. This makes downloads on some services / web pages
fail.
This is solved this by including the Browser userAgent in the
request to the DownloadManager.
Change-Id: If4e0f3c29eb7fd5fc585dd01987ae7f0b54ffc32
Diffstat (limited to 'src/com/android/browser/DownloadHandler.java')
-rw-r--r-- | src/com/android/browser/DownloadHandler.java | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/com/android/browser/DownloadHandler.java b/src/com/android/browser/DownloadHandler.java index 6e2c786..31212b4 100644 --- a/src/com/android/browser/DownloadHandler.java +++ b/src/com/android/browser/DownloadHandler.java @@ -204,6 +204,7 @@ public class DownloadHandler { // old percent-encoded url. String cookies = CookieManager.getInstance().getCookie(url, privateBrowsing); request.addRequestHeader("cookie", cookies); + request.addRequestHeader("User-Agent", userAgent); request.setNotificationVisibility( DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED); if (mimetype == null) { |