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

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

Issue 1149833014: Remove net::HttpUtil::PathForRequest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « no previous file | net/http/http_basic_state.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/logging.h" 9 #include "base/logging.h"
10 #include "base/md5.h" 10 #include "base/md5.h"
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 DCHECK(request); 304 DCHECK(request);
305 305
306 const GURL& url = request->url; 306 const GURL& url = request->url;
307 307
308 if (target_ == HttpAuth::AUTH_PROXY && 308 if (target_ == HttpAuth::AUTH_PROXY &&
309 (url.SchemeIs("https") || url.SchemeIsWSOrWSS())) { 309 (url.SchemeIs("https") || url.SchemeIsWSOrWSS())) {
310 *method = "CONNECT"; 310 *method = "CONNECT";
311 *path = GetHostAndPort(url); 311 *path = GetHostAndPort(url);
312 } else { 312 } else {
313 *method = request->method; 313 *method = request->method;
314 *path = HttpUtil::PathForRequest(url); 314 *path = url.PathForRequest();
315 } 315 }
316 } 316 }
317 317
318 std::string HttpAuthHandlerDigest::AssembleResponseDigest( 318 std::string HttpAuthHandlerDigest::AssembleResponseDigest(
319 const std::string& method, 319 const std::string& method,
320 const std::string& path, 320 const std::string& path,
321 const AuthCredentials& credentials, 321 const AuthCredentials& credentials,
322 const std::string& cnonce, 322 const std::string& cnonce,
323 const std::string& nc) const { 323 const std::string& nc) const {
324 // ha1 = MD5(A1) 324 // ha1 = MD5(A1)
(...skipping 49 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 | « no previous file | net/http/http_basic_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698