diff options
Diffstat (limited to 'src/com/android/browser/DownloadHandler.java')
-rwxr-xr-x[-rw-r--r--] | src/com/android/browser/DownloadHandler.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/com/android/browser/DownloadHandler.java b/src/com/android/browser/DownloadHandler.java index 208d4ce..5fc5b79 100644..100755 --- a/src/com/android/browser/DownloadHandler.java +++ b/src/com/android/browser/DownloadHandler.java @@ -214,7 +214,9 @@ public class DownloadHandler { String cookies = CookieManager.getInstance().getCookie(url, privateBrowsing); request.addRequestHeader("cookie", cookies); request.addRequestHeader("User-Agent", userAgent); - request.addRequestHeader("Referer", referer); + if (!TextUtils.isEmpty(referer)) { + request.addRequestHeader("Referer", referer); + } request.setNotificationVisibility( DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED); if (mimetype == null) { |