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

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

Issue 266053002: Implement alternative string conversion functions in net/ on Android, (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove GN changes Created 6 years, 7 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/net.gyp » ('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/logging.h" 9 #include "base/logging.h"
10 #include "base/md5.h" 10 #include "base/md5.h"
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 if (nonce_.empty()) 220 if (nonce_.empty())
221 return false; 221 return false;
222 222
223 return true; 223 return true;
224 } 224 }
225 225
226 bool HttpAuthHandlerDigest::ParseChallengeProperty(const std::string& name, 226 bool HttpAuthHandlerDigest::ParseChallengeProperty(const std::string& name,
227 const std::string& value) { 227 const std::string& value) {
228 if (LowerCaseEqualsASCII(name, "realm")) { 228 if (LowerCaseEqualsASCII(name, "realm")) {
229 std::string realm; 229 std::string realm;
230 if (!net::ConvertLatin1ToUtf8AndNormalize(value, &realm)) 230 if (!net::ConvertToUtf8AndNormalize(value, kCharsetLatin1, &realm))
231 return false; 231 return false;
232 realm_ = realm; 232 realm_ = realm;
233 original_realm_ = value; 233 original_realm_ = value;
234 } else if (LowerCaseEqualsASCII(name, "nonce")) { 234 } else if (LowerCaseEqualsASCII(name, "nonce")) {
235 nonce_ = value; 235 nonce_ = value;
236 } else if (LowerCaseEqualsASCII(name, "domain")) { 236 } else if (LowerCaseEqualsASCII(name, "domain")) {
237 domain_ = value; 237 domain_ = value;
238 } else if (LowerCaseEqualsASCII(name, "opaque")) { 238 } else if (LowerCaseEqualsASCII(name, "opaque")) {
239 opaque_ = value; 239 opaque_ = value;
240 } else if (LowerCaseEqualsASCII(name, "stale")) { 240 } else if (LowerCaseEqualsASCII(name, "stale")) {
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 // TODO(eroman): Supposedly IIS server requires quotes surrounding qop. 374 // TODO(eroman): Supposedly IIS server requires quotes surrounding qop.
375 authorization += ", qop=" + QopToString(qop_); 375 authorization += ", qop=" + QopToString(qop_);
376 authorization += ", nc=" + nc; 376 authorization += ", nc=" + nc;
377 authorization += ", cnonce=" + HttpUtil::Quote(cnonce); 377 authorization += ", cnonce=" + HttpUtil::Quote(cnonce);
378 } 378 }
379 379
380 return authorization; 380 return authorization;
381 } 381 }
382 382
383 } // namespace net 383 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_auth_handler_basic.cc ('k') | net/net.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698