| Index: net/http/http_auth_handler.cc
|
| diff --git a/net/http/http_auth_handler.cc b/net/http/http_auth_handler.cc
|
| index 51bd6aabf18a42b58bd67a4089565c513d531186..2e0e8a85f238ba63d544a7a1e7f1fa9a553db331 100644
|
| --- a/net/http/http_auth_handler.cc
|
| +++ b/net/http/http_auth_handler.cc
|
| @@ -5,6 +5,7 @@
|
| #include "net/http/http_auth_handler.h"
|
|
|
| #include "base/logging.h"
|
| +#include "base/string_util.h"
|
| #include "net/base/net_errors.h"
|
|
|
| namespace net {
|
| @@ -46,6 +47,21 @@ bool HttpAuthHandler::InitFromChallenge(
|
| return ok;
|
| }
|
|
|
| +// At a minimum, we check for a 'realm' directive in the
|
| +// authentication challenge.
|
| +bool HttpAuthHandler::ShouldInvalidateRejectedAuth(
|
| + HttpAuth::ChallengeTokenizer* challenge) {
|
| + HttpUtil::NameValuePairsIterator parameters = challenge->param_pairs();
|
| + std::string realm;
|
| + while (parameters.GetNext()) {
|
| + if (LowerCaseEqualsASCII(parameters.name(), "realm")) {
|
| + realm = parameters.value();
|
| + break;
|
| + }
|
| + }
|
| + return (realm == realm_);
|
| +}
|
| +
|
| namespace {
|
|
|
| NetLog::EventType EventTypeFromAuthTarget(HttpAuth::Target target) {
|
|
|