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

Unified Diff: net/http/http_proxy_client_socket_pool.cc

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/http/http_proxy_client_socket_pool.cc
===================================================================
--- net/http/http_proxy_client_socket_pool.cc (revision 68026)
+++ net/http/http_proxy_client_socket_pool.cc (working copy)
@@ -11,14 +11,17 @@
#include "googleurl/src/gurl.h"
#include "net/base/load_flags.h"
#include "net/base/net_errors.h"
+#include "net/http/connect_response_http_stream.h"
#include "net/http/http_network_session.h"
#include "net/http/http_proxy_client_socket.h"
+#include "net/http/http_response_headers.h"
#include "net/socket/client_socket_factory.h"
#include "net/socket/client_socket_handle.h"
#include "net/socket/client_socket_pool_base.h"
#include "net/socket/ssl_client_socket.h"
#include "net/socket/ssl_client_socket_pool.h"
#include "net/socket/tcp_client_socket_pool.h"
+#include "net/spdy/spdy_http_stream.h"
#include "net/spdy/spdy_proxy_client_socket.h"
#include "net/spdy/spdy_session.h"
#include "net/spdy/spdy_session_pool.h"
@@ -252,6 +255,10 @@
if (error_response_info_.cert_request_info) {
handle->set_ssl_error_response_info(error_response_info_);
handle->set_is_ssl_error(true);
+ } else if (error_response_info_.headers) {
+ handle->set_ssl_error_response_info(error_response_info_);
vandebo (ex-Chrome) 2010/12/04 00:30:37 Do you need to set this in this case?
Ryan Hamilton 2010/12/09 21:19:35 Yes, definitely. This is how the response headers
+ handle->set_pending_https_proxy_response_stream(
+ pending_https_proxy_response_stream_.release());
}
}
@@ -317,13 +324,21 @@
params_->http_auth_cache(),
params_->http_auth_handler_factory(),
params_->tunnel(),
- using_spdy_));
+ using_spdy_,
+ params_->ssl_params() != NULL));
return transport_socket_->Connect(&callback_);
}
int HttpProxyConnectJob::DoHttpProxyConnectComplete(int result) {
- if (result == OK || result == ERR_PROXY_AUTH_REQUESTED)
+ if (result == OK || result == ERR_PROXY_AUTH_REQUESTED) {
set_socket(transport_socket_.release());
+ } else if (result == ERR_HTTPS_PROXY_TUNNEL_CONNECTION_RESPONSE) {
+ error_response_info_ = *transport_socket_->GetConnectResponseInfo();
vandebo (ex-Chrome) 2010/12/04 00:30:37 Now that you've created the HttpProxyTunnelClientS
Ryan Hamilton 2010/12/09 21:19:35 Hm. You're recommending that we pass up the socke
vandebo (ex-Chrome) 2010/12/11 02:47:49 Please look at the ownership issues. Sounds like
Ryan Hamilton 2010/12/13 19:41:12 Done.
+ pending_https_proxy_response_stream_.reset(
+ transport_socket_->GetConnectResponseStream());
+ DCHECK(!error_response_info_.cert_request_info.get());
+ set_socket(transport_socket_.release());
vandebo (ex-Chrome) 2010/12/04 00:30:37 Since you are making this a "recoverable error" (b
Ryan Hamilton 2010/12/09 21:19:35 Hm. It took me a while to understand the implicat
+ }
return result;
}

Powered by Google App Engine
This is Rietveld 408576698