diff options
author | rch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-25 00:11:23 +0000 |
---|---|---|
committer | rch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-25 00:11:23 +0000 |
commit | 848080bffa1d80a18b9e0c11698e2e087a4ac32d (patch) | |
tree | 7a19e52578bfe8f815b1dd21a2950c66e5deccbd /net/http/http_proxy_client_socket.h | |
parent | c1add6e37884157dc76375962f0f17d2e8916898 (diff) | |
download | chromium_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 'net/http/http_proxy_client_socket.h')
-rw-r--r-- | net/http/http_proxy_client_socket.h | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/net/http/http_proxy_client_socket.h b/net/http/http_proxy_client_socket.h index e4b1844..7a05127 100644 --- a/net/http/http_proxy_client_socket.h +++ b/net/http/http_proxy_client_socket.h @@ -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. @@ -27,7 +27,6 @@ namespace net { class AddressList; class ClientSocketHandle; class GrowableIOBuffer; -class HttpAuthCache; class HttpStream; class HttpStreamParser; class IOBuffer; @@ -42,8 +41,7 @@ class HttpProxyClientSocket : public ProxyClientSocket { const std::string& user_agent, const HostPortPair& endpoint, const HostPortPair& proxy_server, - HttpAuthCache* http_auth_cache, - HttpAuthHandlerFactory* http_auth_handler_factory, + HttpAuthController* http_auth_controller, bool tunnel, bool using_spdy, SSLClientSocket::NextProto protocol_negotiated, @@ -52,15 +50,6 @@ class HttpProxyClientSocket : public ProxyClientSocket { // On destruction Disconnect() is called. virtual ~HttpProxyClientSocket(); - // If Connect (or its callback) returns PROXY_AUTH_REQUESTED, then - // credentials should be added to the HttpAuthController before calling - // RestartWithAuth. - int RestartWithAuth(const CompletionCallback& callback); - - const scoped_refptr<HttpAuthController>& auth_controller() { - return auth_; - } - bool using_spdy() { return using_spdy_; } @@ -72,6 +61,8 @@ class HttpProxyClientSocket : public ProxyClientSocket { // ProxyClientSocket implementation. virtual const HttpResponseInfo* GetConnectResponseInfo() const OVERRIDE; virtual HttpStream* CreateConnectResponseStream() OVERRIDE; + virtual int RestartWithAuth(const CompletionCallback& callback) OVERRIDE; + virtual const scoped_refptr<HttpAuthController>& GetAuthController() OVERRIDE; // StreamSocket implementation. virtual int Connect(const CompletionCallback& callback) OVERRIDE; @@ -109,8 +100,6 @@ class HttpProxyClientSocket : public ProxyClientSocket { STATE_READ_HEADERS_COMPLETE, STATE_DRAIN_BODY, STATE_DRAIN_BODY_COMPLETE, - STATE_TCP_RESTART, - STATE_TCP_RESTART_COMPLETE, STATE_DONE, }; @@ -122,8 +111,6 @@ class HttpProxyClientSocket : public ProxyClientSocket { int PrepareForAuthRestart(); int DidDrainBodyForAuthRestart(bool keep_alive); - int HandleAuthChallenge(); - void LogBlockedTunnelResponse(int response_code) const; void DoCallback(int result); |