summaryrefslogtreecommitdiffstats
path: root/jingle
diff options
context:
space:
mode:
authorrch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-25 00:11:23 +0000
committerrch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-25 00:11:23 +0000
commit848080bffa1d80a18b9e0c11698e2e087a4ac32d (patch)
tree7a19e52578bfe8f815b1dd21a2950c66e5deccbd /jingle
parentc1add6e37884157dc76375962f0f17d2e8916898 (diff)
downloadchromium_src-848080bffa1d80a18b9e0c11698e2e087a4ac32d.zip
chromium_src-848080bffa1d80a18b9e0c11698e2e087a4ac32d.tar.gz
chromium_src-848080bffa1d80a18b9e0c11698e2e087a4ac32d.tar.bz2
Allow chrome to handle 407 auth challenges to CONNECT requests
through HTTPS Proxies. This also changes the mechanism used to restart HttpProxyClientSocket requests with auth. Previously the transport socket would be Disconnected, and then re-Connected (which was not implemented for SSLClientSockets). However, the approach was problematic in the face of, for example, ipv6. The new approach is to close the HttpProxyClientSocket, and request a new socket from the pool. Initially was http://codereview.chromium.org/8502024 which turned out to have problems with NTLM auth. Review URL: http://codereview.chromium.org/9148011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118950 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'jingle')
-rw-r--r--jingle/notifier/base/proxy_resolving_client_socket.cc18
1 files changed, 16 insertions, 2 deletions
diff --git a/jingle/notifier/base/proxy_resolving_client_socket.cc b/jingle/notifier/base/proxy_resolving_client_socket.cc
index ab0b679..83b0281 100644
--- a/jingle/notifier/base/proxy_resolving_client_socket.cc
+++ b/jingle/notifier/base/proxy_resolving_client_socket.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -20,6 +20,18 @@
namespace notifier {
+namespace {
+
+void HandleProxyTunnelAuth(const net::HttpResponseInfo& response_info,
+ net::HttpAuthController* auth_controller,
+ net::CompletionCallback callback) {
+ // Since we have no way to respond, simply invoke the callback and the
+ // request will fail.
+ callback.Run(net::OK);
+}
+
+} // namespace
+
ProxyResolvingClientSocket::ProxyResolvingClientSocket(
net::ClientSocketFactory* socket_factory,
const scoped_refptr<net::URLRequestContextGetter>& request_context_getter,
@@ -172,7 +184,9 @@ void ProxyResolvingClientSocket::ProcessProxyResolveDone(int status) {
// Now that we have resolved the proxy, we need to connect.
status = net::InitSocketHandleForRawConnect(
dest_host_port_pair_, network_session_.get(), proxy_info_, ssl_config_,
- ssl_config_, bound_net_log_, transport_.get(), connect_callback_);
+ ssl_config_, bound_net_log_, transport_.get(),
+ base::Bind(&HandleProxyTunnelAuth), connect_callback_);
+
if (status != net::ERR_IO_PENDING) {
// Since this method is always called asynchronously. it is OK to call
// ProcessConnectDone synchronously.