summaryrefslogtreecommitdiffstats
path: root/net/http/http_proxy_client_socket.h
diff options
context:
space:
mode:
authorvandebo@chromium.org <vandebo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-03 07:38:59 +0000
committervandebo@chromium.org <vandebo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-03 07:38:59 +0000
commit394816e907ab5e328899e41a402537c0ff3c0381 (patch)
tree157bbb558f7f686d500e55e073b7978137469451 /net/http/http_proxy_client_socket.h
parent9c1fe143f8e11092424875fbcdaccec16f141981 (diff)
downloadchromium_src-394816e907ab5e328899e41a402537c0ff3c0381.zip
chromium_src-394816e907ab5e328899e41a402537c0ff3c0381.tar.gz
chromium_src-394816e907ab5e328899e41a402537c0ff3c0381.tar.bz2
Recommit 54405 - Fix late binding induced mismatch of Socket and AuthController
ClientSocketPool treats all pending SocketParams as interchangeable. Therefore they can not contain any connection specific data. This only affects the Http Proxy tunnel case. The lowest risk change to fix this problem is to create the HttpAuthController in the HttpProxyClientSocket. If we get a 407 and need to restart the Tunnel, the pending HttpProxyClientSocket is returned to the HttpNetworkTransaction in the additional error state of the connection and then complete the auth in a pair of states in the HttpNetworkTransaction. This reintroduces a dependency between tunnel setup and the HttpNetworkTransaction, but that will need to be fixed at a later date. Original Review URL: http://codereview.chromium.org/3058013 BUG=49493 TEST=existing unit tests + manually visiting many SSL sites through a kerberized http proxy. Review URL: http://codereview.chromium.org/3029052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54714 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_proxy_client_socket.h')
-rw-r--r--net/http/http_proxy_client_socket.h17
1 files changed, 11 insertions, 6 deletions
diff --git a/net/http/http_proxy_client_socket.h b/net/http/http_proxy_client_socket.h
index 317b220..ef4f76c 100644
--- a/net/http/http_proxy_client_socket.h
+++ b/net/http/http_proxy_client_socket.h
@@ -35,7 +35,8 @@ class HttpProxyClientSocket : public ClientSocket {
// this socket will establish an Http tunnel.
HttpProxyClientSocket(ClientSocketHandle* transport_socket,
const GURL& request_url, const HostPortPair& endpoint,
- const scoped_refptr<HttpAuthController>& auth,
+ const HostPortPair& proxy_server,
+ const scoped_refptr<HttpNetworkSession>& session,
bool tunnel);
// On destruction Disconnect() is called.
@@ -46,12 +47,12 @@ class HttpProxyClientSocket : public ClientSocket {
// RestartWithAuth.
int RestartWithAuth(CompletionCallback* callback);
- // Indicates if RestartWithAuth needs to be called. i.e. if Connect
- // returned PROXY_AUTH_REQUESTED. Only valid after Connect has been called.
- bool NeedsRestartWithAuth() const;
-
const HttpResponseInfo* GetResponseInfo() const {
- return response_.headers ? &response_ : NULL;
+ return response_.headers ? &response_ : NULL;
+ }
+
+ const scoped_refptr<HttpAuthController>& auth_controller() {
+ return auth_;
}
// ClientSocket methods:
@@ -85,6 +86,8 @@ class HttpProxyClientSocket : public ClientSocket {
STATE_RESOLVE_CANONICAL_NAME_COMPLETE,
STATE_DRAIN_BODY,
STATE_DRAIN_BODY_COMPLETE,
+ STATE_TCP_RESTART,
+ STATE_TCP_RESTART_COMPLETE,
STATE_DONE,
};
@@ -112,6 +115,8 @@ class HttpProxyClientSocket : public ClientSocket {
int DoReadHeadersComplete(int result);
int DoDrainBody();
int DoDrainBodyComplete(int result);
+ int DoTCPRestart();
+ int DoTCPRestartComplete(int result);
CompletionCallbackImpl<HttpProxyClientSocket> io_callback_;
State next_state_;