Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(347)

Unified Diff: net/http/http_network_transaction.cc

Issue 13609002: fix a problem that android cannot download files with basic authentication (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/http/http_network_transaction.cc
diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc
index 54d79f3ab78d9e6ac8c1a9cff8a60937652efc89..bab731797ea6fdcf33ce1a9b6359150b28d2c084 100644
--- a/net/http/http_network_transaction.cc
+++ b/net/http/http_network_transaction.cc
@@ -766,12 +766,17 @@ void HttpNetworkTransaction::BuildRequestHeaders(bool using_proxy) {
request_headers_.SetHeader(HttpRequestHeaders::kCacheControl, "max-age=0");
}
- if (ShouldApplyProxyAuth() && HaveAuth(HttpAuth::AUTH_PROXY))
+ response_.request_has_auth = false;
+ if (ShouldApplyProxyAuth() && HaveAuth(HttpAuth::AUTH_PROXY)) {
auth_controllers_[HttpAuth::AUTH_PROXY]->AddAuthorizationHeader(
&request_headers_);
- if (ShouldApplyServerAuth() && HaveAuth(HttpAuth::AUTH_SERVER))
+ response_.request_has_auth = true;
+ }
+ if (ShouldApplyServerAuth() && HaveAuth(HttpAuth::AUTH_SERVER)) {
auth_controllers_[HttpAuth::AUTH_SERVER]->AddAuthorizationHeader(
&request_headers_);
+ response_.request_has_auth = true;
+ }
request_headers_.MergeFrom(request_->extra_headers);
asanka 2013/04/09 17:38:51 I'm sorry I didn't see this earlier. Authorization
qinmin 2013/04/09 20:19:06 Done.
}

Powered by Google App Engine
This is Rietveld 408576698