Skip to content

Commit

Permalink
Handles proxy authentication request in ProxyResolvingClientSocket.
Browse files Browse the repository at this point in the history
This will make the WebRTC connection work under NTLM/Kerberos using the default credential without prompting the user.

BUG=395614

Review URL: https://codereview.chromium.org/414523005

Cr-Commit-Position: refs/heads/master@{#292428}
  • Loading branch information
jiayl authored and Commit bot committed Aug 28, 2014
1 parent 035c3fb commit 260631a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions jingle/glue/proxy_resolving_client_socket.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
#include "net/base/io_buffer.h"
#include "net/base/load_flags.h"
#include "net/base/net_errors.h"
#include "net/http/http_auth_controller.h"
#include "net/http/http_network_session.h"
#include "net/http/proxy_client_socket.h"
#include "net/socket/client_socket_handle.h"
#include "net/socket/client_socket_pool_manager.h"
#include "net/url_request/url_request_context.h"
Expand Down Expand Up @@ -270,6 +272,15 @@ int ProxyResolvingClientSocket::ReconsiderProxyAfterError(int error) {
// "address unreachable" error, and will report both of these failures as
// ERR_ADDRESS_UNREACHABLE.
return net::ERR_ADDRESS_UNREACHABLE;
case net::ERR_PROXY_AUTH_REQUESTED: {
net::ProxyClientSocket* proxy_socket =
static_cast<net::ProxyClientSocket*>(transport_->socket());

if (proxy_socket->GetAuthController()->HaveAuth())
return proxy_socket->RestartWithAuth(connect_callback_);

return error;
}
default:
return error;
}
Expand Down

0 comments on commit 260631a

Please sign in to comment.