diff options
author | erikwright@chromium.org <erikwright@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-30 13:28:44 +0000 |
---|---|---|
committer | erikwright@chromium.org <erikwright@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-30 13:28:44 +0000 |
commit | e3fe59bfb0912596e8975f9c50b01683c19ee5d9 (patch) | |
tree | 04b9c722b6f9db105acfc70bd286cb4f78c7d843 /net/http/http_auth_sspi_win.cc | |
parent | d1cd0715ae8b15982b7ca46f4497eeddb4b73bca (diff) | |
download | chromium_src-e3fe59bfb0912596e8975f9c50b01683c19ee5d9.zip chromium_src-e3fe59bfb0912596e8975f9c50b01683c19ee5d9.tar.gz chromium_src-e3fe59bfb0912596e8975f9c50b01683c19ee5d9.tar.bz2 |
Extract name-value pair parsing from http_auth.cc (ChallengeTokenizer) into http_util.cc (NameValuePairsIterator). In preparation for re-use of name-value pair parsing in ChromeFrame (for X-UA-Compatible header).
BUG=None
TEST=net_unittests (HttpAuth* and HttpUtilTest.NameValuePairs*)
Review URL: http://codereview.chromium.org/3525004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61061 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_auth_sspi_win.cc')
-rw-r--r-- | net/http/http_auth_sspi_win.cc | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/net/http/http_auth_sspi_win.cc b/net/http/http_auth_sspi_win.cc index 276eea4..65281e0 100644 --- a/net/http/http_auth_sspi_win.cc +++ b/net/http/http_auth_sspi_win.cc @@ -222,12 +222,11 @@ void HttpAuthSSPI::ResetSecurityContext() { HttpAuth::AuthorizationResult HttpAuthSSPI::ParseChallenge( HttpAuth::ChallengeTokenizer* tok) { // Verify the challenge's auth-scheme. - if (!tok->valid() || - !LowerCaseEqualsASCII(tok->scheme(), StringToLowerASCII(scheme_).c_str())) + if (!LowerCaseEqualsASCII(tok->scheme(), StringToLowerASCII(scheme_).c_str())) return HttpAuth::AUTHORIZATION_RESULT_INVALID; - tok->set_expect_base64_token(true); - if (!tok->GetNext()) { + std::string encoded_auth_token = tok->base64_param(); + if (encoded_auth_token.empty()) { // If a context has already been established, an empty challenge // should be treated as a rejection of the current attempt. if (SecIsValidHandle(&ctxt_)) @@ -241,7 +240,6 @@ HttpAuth::AuthorizationResult HttpAuthSSPI::ParseChallenge( return HttpAuth::AUTHORIZATION_RESULT_INVALID; } - std::string encoded_auth_token = tok->value(); std::string decoded_auth_token; bool base64_rv = base::Base64Decode(encoded_auth_token, &decoded_auth_token); if (!base64_rv) |