diff options
author | rch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-17 03:58:29 +0000 |
---|---|---|
committer | rch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-17 03:58:29 +0000 |
commit | 511f6f525dacf2512439b12784186074a0f6cd5c (patch) | |
tree | 5fa90bbe0fa255de3d78d00dcffd333830e13aea /net/http/proxy_client_socket.h | |
parent | 8aad42dcc8d683242c730901c51061de710046b9 (diff) | |
download | chromium_src-511f6f525dacf2512439b12784186074a0f6cd5c.zip chromium_src-511f6f525dacf2512439b12784186074a0f6cd5c.tar.gz chromium_src-511f6f525dacf2512439b12784186074a0f6cd5c.tar.bz2 |
Allow a non-200 (or non-407) response for a CONNECT request from an HTTPS proxy
to be consumed by chrome. Among other things, this will allow the proxy to
inform the user that the hostname could not be resolved or similar conditions.
This adds a new OnHttpsProxyTunnelConnectionResponse method to
StreamRequest::Delegate which is invoked when an HTTPS proxy returns a non-200,
non-407 response. The method is called with an HttpResponseInfor argument to
access the request headers, and an HttpStream argument to access the response body.
BUG=none
TEST=HttpNetworkTransactionTest
Review URL: http://codereview.chromium.org/4935001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69513 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/proxy_client_socket.h')
-rw-r--r-- | net/http/proxy_client_socket.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/net/http/proxy_client_socket.h b/net/http/proxy_client_socket.h new file mode 100644 index 0000000..6557c883 --- /dev/null +++ b/net/http/proxy_client_socket.h @@ -0,0 +1,35 @@ +// Copyright (c) 2010 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. + +#ifndef NET_HTTP_PROXY_CLIENT_SOCKET_H_ +#define NET_HTTP_PROXY_CLIENT_SOCKET_H_ +#pragma once + +#include "net/socket/client_socket.h" + +namespace net { + +class HttpStream; +class HttpResponseInfo; + +class ProxyClientSocket : public ClientSocket { + public: + ProxyClientSocket() {} + virtual ~ProxyClientSocket() {} + + // Returns the HttpResponseInfo (including HTTP Headers) from + // the response to the CONNECT request. + virtual const HttpResponseInfo* GetConnectResponseInfo() const = 0; + + // Transfers ownership of a newly created HttpStream to the caller + // which can be used to read the response body. + virtual HttpStream* CreateConnectResponseStream() = 0; + + private: + DISALLOW_COPY_AND_ASSIGN(ProxyClientSocket); +}; + +} // namespace net + +#endif // NET_HTTP_PROXY_CLIENT_SOCKET_H_ |