| Index: net/http/http_network_transaction.cc
|
| ===================================================================
|
| --- net/http/http_network_transaction.cc (revision 57349)
|
| +++ net/http/http_network_transaction.cc (working copy)
|
| @@ -322,7 +322,7 @@
|
| // because an active network attacker can already control HTTP sessions.
|
| // We reach this case when the user cancels a 407 proxy auth prompt.
|
| // See http://crbug.com/8473.
|
| - DCHECK(proxy_info_.is_http());
|
| + DCHECK(proxy_info_.is_http() || proxy_info_.is_https());
|
| DCHECK_EQ(headers->response_code(), 407);
|
| LOG(WARNING) << "Blocked proxy response with status "
|
| << headers->response_code() << " to CONNECT request for "
|
| @@ -683,7 +683,8 @@
|
| HttpRequestHeaders request_headers;
|
|
|
| BuildRequestHeaders(request_, authorization_headers, request_body,
|
| - !is_https_request() && proxy_info_.is_http(),
|
| + !is_https_request() && (proxy_info_.is_http() ||
|
| + proxy_info_.is_https()),
|
| &request_line, &request_headers);
|
|
|
| if (session_->network_delegate())
|
| @@ -1118,7 +1119,8 @@
|
| }
|
|
|
| bool HttpNetworkTransaction::ShouldApplyProxyAuth() const {
|
| - return !is_https_request() && proxy_info_.is_http();
|
| + return !is_https_request() &&
|
| + (proxy_info_.is_https() || proxy_info_.is_http());
|
| }
|
|
|
| bool HttpNetworkTransaction::ShouldApplyServerAuth() const {
|
| @@ -1159,13 +1161,15 @@
|
|
|
| GURL HttpNetworkTransaction::AuthURL(HttpAuth::Target target) const {
|
| switch (target) {
|
| - case HttpAuth::AUTH_PROXY:
|
| + case HttpAuth::AUTH_PROXY: {
|
| if (!proxy_info_.proxy_server().is_valid() ||
|
| proxy_info_.proxy_server().is_direct()) {
|
| return GURL(); // There is no proxy server.
|
| }
|
| - return GURL("http://" +
|
| + const char* scheme = proxy_info_.is_https() ? "https://" : "http://";
|
| + return GURL(scheme +
|
| proxy_info_.proxy_server().host_port_pair().ToString());
|
| + }
|
| case HttpAuth::AUTH_SERVER:
|
| return request_->url;
|
| default:
|
|
|