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

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: Cleaned up 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 68026)
+++ net/spdy/spdy_proxy_client_socket.h (working copy)
@@ -15,10 +15,11 @@
#include "net/base/host_port_pair.h"
#include "net/base/net_log.h"
#include "net/http/http_auth_controller.h"
+#include "net/http/http_proxy_tunnel_client_socket.h"
#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/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 HttpProxyTunnelClientSocket,
+ 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,21 @@
return auth_;
}
- const HttpResponseInfo* GetConnectResponseInfo() const {
+ // HttpProxyTunnelClientSocket methods:
+
+ 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* GetConnectResponseStream() {
+ SpdyStream* stream = spdy_stream_;
vandebo (ex-Chrome) 2010/12/04 00:30:37 Should this implementation go in the .cpp ?
Ryan Hamilton 2010/12/09 21:19:35 Done.
+ spdy_stream_ = NULL;
+ return new SpdyHttpStream(stream);
+ }
+
// ClientSocket methods:
virtual int Connect(CompletionCallback* callback);

Powered by Google App Engine
This is Rietveld 408576698