| Index: net/socket/ssl_client_socket_pool.cc
|
| ===================================================================
|
| --- net/socket/ssl_client_socket_pool.cc (revision 54615)
|
| +++ net/socket/ssl_client_socket_pool.cc (working copy)
|
| @@ -103,6 +103,11 @@
|
| }
|
|
|
| int SSLConnectJob::ConnectInternal() {
|
| + DetermineFirstState();
|
| + return DoLoop(OK);
|
| +}
|
| +
|
| +void SSLConnectJob::DetermineFirstState() {
|
| switch (params_->proxy()) {
|
| case ProxyServer::SCHEME_DIRECT:
|
| next_state_ = STATE_TCP_CONNECT;
|
| @@ -118,7 +123,6 @@
|
| NOTREACHED() << "unknown proxy type";
|
| break;
|
| }
|
| - return DoLoop(OK);
|
| }
|
|
|
| void SSLConnectJob::OnIOComplete(int result) {
|
| @@ -210,7 +214,6 @@
|
| int SSLConnectJob::DoTunnelConnect() {
|
| DCHECK(http_proxy_pool_.get());
|
| next_state_ = STATE_TUNNEL_CONNECT_COMPLETE;
|
| -
|
| transport_socket_handle_.reset(new ClientSocketHandle());
|
| scoped_refptr<HttpProxySocketParams> http_proxy_params =
|
| params_->http_proxy_params();
|
| @@ -225,6 +228,12 @@
|
| HttpProxyClientSocket* tunnel_socket =
|
| static_cast<HttpProxyClientSocket*>(socket);
|
|
|
| + if (result == ERR_RETRY_CONNECTION) {
|
| + DetermineFirstState();
|
| + transport_socket_handle_->socket()->Disconnect();
|
| + return OK;
|
| + }
|
| +
|
| // Extract the information needed to prompt for the proxy authentication.
|
| // so that when ClientSocketPoolBaseHelper calls |GetAdditionalErrorState|,
|
| // we can easily set the state.
|
| @@ -234,17 +243,20 @@
|
| if (result < 0)
|
| return result;
|
|
|
| - DCHECK(tunnel_socket->IsConnected());
|
| + if (tunnel_socket->NeedsRestartWithAuth()) {
|
| + // We must have gotten an 'idle' tunnel socket that is waiting for auth.
|
| + // The HttpAuthController should have new credentials, we just need
|
| + // to retry.
|
| + next_state_ = STATE_TUNNEL_CONNECT_COMPLETE;
|
| + return tunnel_socket->RestartWithAuth(&callback_);
|
| + }
|
| +
|
| next_state_ = STATE_SSL_CONNECT;
|
| return result;
|
| }
|
|
|
| void SSLConnectJob::GetAdditionalErrorState(ClientSocketHandle * handle) {
|
| - if (error_response_info_.headers) {
|
| - handle->set_ssl_error_response_info(error_response_info_);
|
| - handle->set_pending_http_proxy_connection(
|
| - transport_socket_handle_.release());
|
| - }
|
| + handle->set_ssl_error_response_info(error_response_info_);
|
| if (!ssl_connect_start_time_.is_null())
|
| handle->set_is_ssl_error(true);
|
| }
|
|
|
| Property changes on: net\socket\ssl_client_socket_pool.cc
|
| ___________________________________________________________________
|
| Added: svn:mergeinfo
|
|
|
|
|