Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(157)

Unified Diff: net/spdy/spdy_proxy_client_socket.h

Issue 4935001: Allow a non-200 (or non-407) response for a CONNECT request from an HTTPS pro... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/spdy/spdy_proxy_client_socket.h
===================================================================
--- net/spdy/spdy_proxy_client_socket.h (revision 68959)
+++ net/spdy/spdy_proxy_client_socket.h (working copy)
@@ -18,7 +18,8 @@
#include "net/http/http_request_headers.h"
#include "net/http/http_request_info.h"
#include "net/http/http_response_info.h"
-#include "net/socket/client_socket.h"
+#include "net/http/proxy_client_socket.h"
+#include "net/spdy/spdy_http_stream.h"
#include "net/spdy/spdy_protocol.h"
#include "net/spdy/spdy_session.h"
#include "net/spdy/spdy_stream.h"
@@ -35,7 +36,8 @@
class SpdySession;
class SpdyStream;
-class SpdyProxyClientSocket : public ClientSocket, public SpdyStream::Delegate {
+class SpdyProxyClientSocket : public ProxyClientSocket,
+ public SpdyStream::Delegate {
public:
// Create a socket on top of the |spdy_stream| by sending a SYN_STREAM
// CONNECT frame for |endpoint|. After the SYN_REPLY is received,
@@ -57,10 +59,17 @@
return auth_;
}
- const HttpResponseInfo* GetConnectResponseInfo() const {
+ // HttpProxyTunnelClientSocket methods:
vandebo (ex-Chrome) 2010/12/16 17:59:23 nit: ProxyClientSocket
+
+ virtual const HttpResponseInfo* GetConnectResponseInfo() const {
return response_.headers ? &response_ : NULL;
}
+ // In the event of a non-200 response to the CONNECT request, this
+ // method may be called to return an HttpStream in order to read
+ // the response body.
+ virtual HttpStream* CreateConnectResponseStream();
+
// ClientSocket methods:
virtual int Connect(CompletionCallback* callback);
virtual void Disconnect();
@@ -152,6 +161,8 @@
// True if the transport socket has ever sent data.
bool was_ever_used_;
+ scoped_ptr<SpdyHttpStream> response_stream_;
+
const BoundNetLog net_log_;
DISALLOW_COPY_AND_ASSIGN(SpdyProxyClientSocket);

Powered by Google App Engine
This is Rietveld 408576698