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

Side by Side Diff: net/http/http_auth_handler_digest.cc

Issue 10916272: Remove HttpAuth::Scheme enum in favor of a string. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/http/http_auth_handler_basic.cc ('k') | net/http/http_auth_handler_factory_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/http/http_auth_handler_digest.h" 5 #include "net/http/http_auth_handler_digest.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/i18n/icu_string_conversions.h" 9 #include "base/i18n/icu_string_conversions.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 // 179 //
180 // Note that according to RFC 2617 (section 1.2) the realm is required. 180 // Note that according to RFC 2617 (section 1.2) the realm is required.
181 // However we allow it to be omitted, in which case it will default to the 181 // However we allow it to be omitted, in which case it will default to the
182 // empty string. 182 // empty string.
183 // 183 //
184 // This allowance is for better compatibility with webservers that fail to 184 // This allowance is for better compatibility with webservers that fail to
185 // send the realm (See http://crbug.com/20984 for an instance where a 185 // send the realm (See http://crbug.com/20984 for an instance where a
186 // webserver was not sending the realm with a BASIC challenge). 186 // webserver was not sending the realm with a BASIC challenge).
187 bool HttpAuthHandlerDigest::ParseChallenge( 187 bool HttpAuthHandlerDigest::ParseChallenge(
188 HttpAuth::ChallengeTokenizer* challenge) { 188 HttpAuth::ChallengeTokenizer* challenge) {
189 auth_scheme_ = HttpAuth::AUTH_SCHEME_DIGEST; 189 auth_scheme_ = "digest";
190 score_ = 2; 190 score_ = 2;
191 properties_ = ENCRYPTS_IDENTITY; 191 properties_ = ENCRYPTS_IDENTITY;
192 192
193 // Initialize to defaults. 193 // Initialize to defaults.
194 stale_ = false; 194 stale_ = false;
195 algorithm_ = ALGORITHM_UNSPECIFIED; 195 algorithm_ = ALGORITHM_UNSPECIFIED;
196 qop_ = QOP_UNSPECIFIED; 196 qop_ = QOP_UNSPECIFIED;
197 realm_ = original_realm_ = nonce_ = domain_ = opaque_ = std::string(); 197 realm_ = original_realm_ = nonce_ = domain_ = opaque_ = std::string();
198 198
199 // FAIL -- Couldn't match auth-scheme. 199 // FAIL -- Couldn't match auth-scheme.
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 // TODO(eroman): Supposedly IIS server requires quotes surrounding qop. 371 // TODO(eroman): Supposedly IIS server requires quotes surrounding qop.
372 authorization += ", qop=" + QopToString(qop_); 372 authorization += ", qop=" + QopToString(qop_);
373 authorization += ", nc=" + nc; 373 authorization += ", nc=" + nc;
374 authorization += ", cnonce=" + HttpUtil::Quote(cnonce); 374 authorization += ", cnonce=" + HttpUtil::Quote(cnonce);
375 } 375 }
376 376
377 return authorization; 377 return authorization;
378 } 378 }
379 379
380 } // namespace net 380 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_auth_handler_basic.cc ('k') | net/http/http_auth_handler_factory_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698