summaryrefslogtreecommitdiffstats
path: root/net/http/http_network_transaction.h
diff options
context:
space:
mode:
authorwtc@google.com <wtc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-25 20:41:46 +0000
committerwtc@google.com <wtc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-25 20:41:46 +0000
commitc7af8b2475369ae8fd1f596c7265b08026c10cb4 (patch)
treeb71ba9fabe98030c23c7c317f31283b7fdb816a2 /net/http/http_network_transaction.h
parent4132cc5ad7443aec1837c6501212906043ea1131 (diff)
downloadchromium_src-c7af8b2475369ae8fd1f596c7265b08026c10cb4.zip
chromium_src-c7af8b2475369ae8fd1f596c7265b08026c10cb4.tar.gz
chromium_src-c7af8b2475369ae8fd1f596c7265b08026c10cb4.tar.bz2
Implement SSL tunneling through a proxy server.
Add several states to HttpNetworkTransaction for the HTTP CONNECT method and the SSL Connect (handshake) after the tunnel is connected. Add the error code ERR_TUNNEL_CONNECTION_FAILED for failure to connect a tunnel. R=darin BUG=1272555 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1329 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_network_transaction.h')
-rw-r--r--net/http/http_network_transaction.h24
1 files changed, 23 insertions, 1 deletions
diff --git a/net/http/http_network_transaction.h b/net/http/http_network_transaction.h
index 1d0673d..5386196 100644
--- a/net/http/http_network_transaction.h
+++ b/net/http/http_network_transaction.h
@@ -44,6 +44,7 @@ class HttpNetworkTransaction : public HttpTransaction {
private:
~HttpNetworkTransaction();
void BuildRequestHeaders();
+ void BuildTunnelRequest();
void DoCallback(int result);
void OnIOComplete(int result);
@@ -62,6 +63,12 @@ class HttpNetworkTransaction : public HttpTransaction {
int DoResolveHostComplete(int result);
int DoConnect();
int DoConnectComplete(int result);
+ int DoWriteTunnelRequest();
+ int DoWriteTunnelRequestComplete(int result);
+ int DoReadTunnelResponse();
+ int DoReadTunnelResponseComplete(int result);
+ int DoSSLConnectOverTunnel();
+ int DoSSLConnectOverTunnelComplete(int result);
int DoWriteHeaders();
int DoWriteHeadersComplete(int result);
int DoWriteBody();
@@ -71,7 +78,16 @@ class HttpNetworkTransaction : public HttpTransaction {
int DoReadBody();
int DoReadBodyComplete(int result);
- // Called when read_buf_ contains the complete response headers.
+ // Called to write the request headers in request_headers_.
+ int WriteRequestHeaders();
+
+ // Called to read the response headers into header_buf_.
+ int ReadResponseHeaders();
+
+ // Called when header_buf_ contains the complete CONNECT response.
+ int DidReadTunnelResponse();
+
+ // Called when header_buf_ contains the complete response headers.
int DidReadResponseHeaders();
// Called to possibly recover from the given error. Sets next_state_ and
@@ -138,6 +154,12 @@ class HttpNetworkTransaction : public HttpTransaction {
STATE_RESOLVE_HOST_COMPLETE,
STATE_CONNECT,
STATE_CONNECT_COMPLETE,
+ STATE_WRITE_TUNNEL_REQUEST,
+ STATE_WRITE_TUNNEL_REQUEST_COMPLETE,
+ STATE_READ_TUNNEL_RESPONSE,
+ STATE_READ_TUNNEL_RESPONSE_COMPLETE,
+ STATE_SSL_CONNECT_OVER_TUNNEL,
+ STATE_SSL_CONNECT_OVER_TUNNEL_COMPLETE,
STATE_WRITE_HEADERS,
STATE_WRITE_HEADERS_COMPLETE,
STATE_WRITE_BODY,