Index: net/socket/ssl_client_socket_pool.cc |
diff --git a/net/socket/ssl_client_socket_pool.cc b/net/socket/ssl_client_socket_pool.cc |
index 3fd960c8a5f83e1c216ed6197000f308ea35ffa6..46474c1a2658675c5808edee10ba6664638812ac 100644 |
--- a/net/socket/ssl_client_socket_pool.cc |
+++ b/net/socket/ssl_client_socket_pool.cc |
@@ -228,6 +228,8 @@ int SSLConnectJob::DoTunnelConnectComplete(int result) { |
if (result == ERR_RETRY_CONNECTION) { |
DetermineFirstState(); |
+ params_->http_proxy_params()->set_auth_controller( |
+ tunnel_socket->ReleaseAuthController()); |
transport_socket_handle_->socket()->Disconnect(); |
return OK; |
} |
@@ -246,7 +248,14 @@ int SSLConnectJob::DoTunnelConnectComplete(int result) { |
// The HttpAuthController should have new credentials, we just need |
// to retry. |
next_state_ = STATE_TUNNEL_CONNECT_COMPLETE; |
- return tunnel_socket->RestartWithAuth(&callback_); |
+ scoped_ptr<HttpAuthController> auth( |
+ params_->http_proxy_params()->ReleaseAuthController()); |
+ const HttpAuth::Identity& auth_credentials = auth->AuthIdentity(); |
+ DCHECK_EQ(auth_credentials.source, HttpAuth::IDENT_SRC_EXTERNAL); |
+ DCHECK(!auth_credentials.invalid); |
+ return tunnel_socket->RestartWithAuth(auth_credentials.username, |
+ auth_credentials.password, |
+ &callback_); |
} |
next_state_ = STATE_SSL_CONNECT; |