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

Unified Diff: net/http/http_auth.cc

Issue 3040015: Fix for Proxy server authentication without credentials available. (Closed)
Patch Set: Minor style change Created 10 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_auth.cc
diff --git a/net/http/http_auth.cc b/net/http/http_auth.cc
index ff2ac4f7dac7215a98f2c750da003cc0d9b8445b..e6fdfe8dd032067c8050fe16a2f48ba17511e02a 100644
--- a/net/http/http_auth.cc
+++ b/net/http/http_auth.cc
@@ -31,7 +31,8 @@ void HttpAuth::ChooseBestChallenge(
// A connection-based authentication scheme must continue to use the
// existing handler object in |*handler|.
- if (handler->get() && (*handler)->is_connection_based()) {
+ if (handler->get() && (*handler)->is_connection_based() &&
+ (disabled_schemes.find((*handler)->scheme()) == disabled_schemes.end())) {
const std::string header_name = GetChallengeHeaderName(target);
std::string challenge;
void* iter = NULL;
@@ -57,10 +58,9 @@ void HttpAuth::ChooseBestChallenge(
<< ErrorToString(rv) << " Challenge: " << cur_challenge;
continue;
}
- if (cur.get() && (!best.get() || best->score() < cur->score())) {
- if (disabled_schemes.find(cur->scheme()) == disabled_schemes.end())
- best.swap(cur);
- }
+ if (cur.get() && (!best.get() || best->score() < cur->score()) &&
+ (disabled_schemes.find(cur->scheme()) == disabled_schemes.end()))
+ best.swap(cur);
}
handler->swap(best);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698