Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_proxy_utils.h" | 5 #include "net/http/http_proxy_utils.h" |
| 6 | 6 |
| 7 #include "base/stringprintf.h" | 7 #include "base/stringprintf.h" |
| 8 #include "googleurl/src/gurl.h" | 8 #include "googleurl/src/gurl.h" |
| 9 #include "net/base/host_port_pair.h" | 9 #include "net/base/host_port_pair.h" |
| 10 #include "net/base/net_errors.h" | 10 #include "net/base/net_errors.h" |
| (...skipping 26 matching lines...) Expand all Loading... | |
| 37 &user_agent)) | 37 &user_agent)) |
| 38 request_headers->SetHeader(HttpRequestHeaders::kUserAgent, user_agent); | 38 request_headers->SetHeader(HttpRequestHeaders::kUserAgent, user_agent); |
| 39 | 39 |
| 40 request_headers->MergeFrom(auth_headers); | 40 request_headers->MergeFrom(auth_headers); |
| 41 } | 41 } |
| 42 | 42 |
| 43 int HandleAuthChallenge(HttpAuthController* auth, | 43 int HandleAuthChallenge(HttpAuthController* auth, |
| 44 HttpResponseInfo* response, | 44 HttpResponseInfo* response, |
| 45 const BoundNetLog& net_log) { | 45 const BoundNetLog& net_log) { |
| 46 DCHECK(response->headers); | 46 DCHECK(response->headers); |
| 47 int option_mask = (HttpAuthController::CHALLENGE_OPTION_SEND_SERVER_AUTH | | |
| 48 HttpAuthController::CHALLENGE_OPTION_USE_EMBEDDED_AUTH | | |
|
cbentzel
2012/02/06 15:55:38
Why is embedded auth OK here?
Tom Sepez
2012/02/06 18:05:30
Duplicating the existing logic in this path. Was
| |
| 49 HttpAuthController::CHALLENGE_OPTION_ESTABLISHING_TUNNEL); | |
| 47 | 50 |
| 48 int rv = auth->HandleAuthChallenge(response->headers, false, true, net_log); | 51 int rv = auth->HandleAuthChallenge(response->headers, option_mask, net_log); |
| 49 response->auth_challenge = auth->auth_info(); | 52 response->auth_challenge = auth->auth_info(); |
| 50 if (rv == OK) | 53 if (rv == OK) |
| 51 return ERR_PROXY_AUTH_REQUESTED; | 54 return ERR_PROXY_AUTH_REQUESTED; |
| 52 return rv; | 55 return rv; |
| 53 } | 56 } |
| 54 | 57 |
| 55 } // namespace net | 58 } // namespace net |
| OLD | NEW |