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

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

Issue 10854139: Use HttpAuthController in SocketStream (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebased and Skipped added browser test on chromeos 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
« no previous file with comments | « chrome/test/data/http/tests/wss.html ('k') | net/http/http_auth_handler_digest_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 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 } 296 }
297 297
298 void HttpAuthHandlerDigest::GetRequestMethodAndPath( 298 void HttpAuthHandlerDigest::GetRequestMethodAndPath(
299 const HttpRequestInfo* request, 299 const HttpRequestInfo* request,
300 std::string* method, 300 std::string* method,
301 std::string* path) const { 301 std::string* path) const {
302 DCHECK(request); 302 DCHECK(request);
303 303
304 const GURL& url = request->url; 304 const GURL& url = request->url;
305 305
306 if (target_ == HttpAuth::AUTH_PROXY && url.SchemeIs("https")) { 306 if (target_ == HttpAuth::AUTH_PROXY &&
307 (url.SchemeIs("https") || url.SchemeIs("ws") || url.SchemeIs("wss"))) {
307 *method = "CONNECT"; 308 *method = "CONNECT";
308 *path = GetHostAndPort(url); 309 *path = GetHostAndPort(url);
309 } else { 310 } else {
310 *method = request->method; 311 *method = request->method;
311 *path = HttpUtil::PathForRequest(url); 312 *path = HttpUtil::PathForRequest(url);
312 } 313 }
313 } 314 }
314 315
315 std::string HttpAuthHandlerDigest::AssembleResponseDigest( 316 std::string HttpAuthHandlerDigest::AssembleResponseDigest(
316 const std::string& method, 317 const std::string& method,
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 // TODO(eroman): Supposedly IIS server requires quotes surrounding qop. 372 // TODO(eroman): Supposedly IIS server requires quotes surrounding qop.
372 authorization += ", qop=" + QopToString(qop_); 373 authorization += ", qop=" + QopToString(qop_);
373 authorization += ", nc=" + nc; 374 authorization += ", nc=" + nc;
374 authorization += ", cnonce=" + HttpUtil::Quote(cnonce); 375 authorization += ", cnonce=" + HttpUtil::Quote(cnonce);
375 } 376 }
376 377
377 return authorization; 378 return authorization;
378 } 379 }
379 380
380 } // namespace net 381 } // namespace net
OLDNEW
« no previous file with comments | « chrome/test/data/http/tests/wss.html ('k') | net/http/http_auth_handler_digest_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698