diff options
author | qinmin@chromium.org <qinmin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-10 04:18:20 +0000 |
---|---|---|
committer | qinmin@chromium.org <qinmin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-10 04:18:20 +0000 |
commit | 173f8e20d4b58db5d45dab905307b6ed1b072b85 (patch) | |
tree | eac1a90b586ba8d68ebed1dfc1e61bb8027b21b2 /chrome/browser/android/intercept_download_resource_throttle.cc | |
parent | 9e70a74ab916161a471c026fed7d0ad41a2eeb8f (diff) | |
download | chromium_src-173f8e20d4b58db5d45dab905307b6ed1b072b85.zip chromium_src-173f8e20d4b58db5d45dab905307b6ed1b072b85.tar.gz chromium_src-173f8e20d4b58db5d45dab905307b6ed1b072b85.tar.bz2 |
fix a problem that android cannot download files with basic authentication
Android download manager does not support authentication headers.
This change adds a call to check if a url request contains authentication headers.
If so, we fallback to chrome download path instead of using the download manager.
BUG=159687
Review URL: https://chromiumcodereview.appspot.com/13609002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193318 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/android/intercept_download_resource_throttle.cc')
-rw-r--r-- | chrome/browser/android/intercept_download_resource_throttle.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/chrome/browser/android/intercept_download_resource_throttle.cc b/chrome/browser/android/intercept_download_resource_throttle.cc index 8f71890..331b392 100644 --- a/chrome/browser/android/intercept_download_resource_throttle.cc +++ b/chrome/browser/android/intercept_download_resource_throttle.cc @@ -34,7 +34,8 @@ void InterceptDownloadResourceThrottle::WillProcessResponse(bool* defer) { } void InterceptDownloadResourceThrottle::ProcessDownloadRequest() { - if (request_->method() != net::HttpRequestHeaders::kGetMethod) + if (request_->method() != net::HttpRequestHeaders::kGetMethod || + request_->response_info().did_use_http_auth) return; content::DownloadControllerAndroid::Get()->CreateGETDownload( |