summaryrefslogtreecommitdiffstats
path: root/net/http/http_auth.cc
diff options
context:
space:
mode:
authorwtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-18 17:46:10 +0000
committerwtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-18 17:46:10 +0000
commit4de702f4d2053b586d4b9b12181ef953e2773da8 (patch)
treee7e60b480dce10b27ce51a04a6603332c31a395f /net/http/http_auth.cc
parent95c9bbd7141891389a00c3334df22be97ff37598 (diff)
downloadchromium_src-4de702f4d2053b586d4b9b12181ef953e2773da8.zip
chromium_src-4de702f4d2053b586d4b9b12181ef953e2773da8.tar.gz
chromium_src-4de702f4d2053b586d4b9b12181ef953e2773da8.tar.bz2
We should pass the service principal name (SPN) of the
format "HTTP/host:port" as the third argument (pszTargetName) to InitializeSecurityContext. This requires adding a host_and_port parameter to some methods. Remove obsolete (and incorrect) logging code in HttpNetworkTransaction::PrepareForAuthRestart(). R=eroman BUG=18009 TEST=none Review URL: http://codereview.chromium.org/206022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26588 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_auth.cc')
-rw-r--r--net/http/http_auth.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/net/http/http_auth.cc b/net/http/http_auth.cc
index ce3e110..ba9b1ea 100644
--- a/net/http/http_auth.cc
+++ b/net/http/http_auth.cc
@@ -19,6 +19,7 @@ namespace net {
// static
void HttpAuth::ChooseBestChallenge(const HttpResponseHeaders* headers,
Target target,
+ const GURL& origin,
scoped_refptr<HttpAuthHandler>* handler) {
// A connection-based authentication scheme must continue to use the
// existing handler object in |*handler|.
@@ -30,7 +31,7 @@ void HttpAuth::ChooseBestChallenge(const HttpResponseHeaders* headers,
ChallengeTokenizer props(challenge.begin(), challenge.end());
if (LowerCaseEqualsASCII(props.scheme(), (*handler)->scheme().c_str()) &&
(*handler)->InitFromChallenge(challenge.begin(), challenge.end(),
- target))
+ target, origin))
return;
}
}
@@ -42,7 +43,7 @@ void HttpAuth::ChooseBestChallenge(const HttpResponseHeaders* headers,
void* iter = NULL;
while (headers->EnumerateHeader(&iter, header_name, &cur_challenge)) {
scoped_refptr<HttpAuthHandler> cur;
- CreateAuthHandler(cur_challenge, target, &cur);
+ CreateAuthHandler(cur_challenge, target, origin, &cur);
if (cur && (!best || best->score() < cur->score()))
best.swap(cur);
}
@@ -52,6 +53,7 @@ void HttpAuth::ChooseBestChallenge(const HttpResponseHeaders* headers,
// static
void HttpAuth::CreateAuthHandler(const std::string& challenge,
Target target,
+ const GURL& origin,
scoped_refptr<HttpAuthHandler>* handler) {
// Find the right auth handler for the challenge's scheme.
ChallengeTokenizer props(challenge.begin(), challenge.end());
@@ -70,7 +72,7 @@ void HttpAuth::CreateAuthHandler(const std::string& challenge,
}
if (tmp_handler) {
if (!tmp_handler->InitFromChallenge(challenge.begin(), challenge.end(),
- target)) {
+ target, origin)) {
// Invalid/unsupported challenge.
tmp_handler = NULL;
}