| Index: net/http/http_stream_request.cc
|
| ===================================================================
|
| --- net/http/http_stream_request.cc (revision 68959)
|
| +++ net/http/http_stream_request.cc (working copy)
|
| @@ -206,6 +206,12 @@
|
| delegate_->OnNeedsClientAuth(cert_info);
|
| }
|
|
|
| +void HttpStreamRequest::OnHttpsProxyTunnelResponseCallback(
|
| + const HttpResponseInfo& response_info,
|
| + HttpStream* stream) {
|
| + delegate_->OnHttpsProxyTunnelResponse(response_info, stream);
|
| +}
|
| +
|
| void HttpStreamRequest::OnPreconnectsComplete(int result) {
|
| preconnect_delegate_->OnPreconnectsComplete(this, result);
|
| }
|
| @@ -253,7 +259,7 @@
|
| HttpProxyClientSocket* http_proxy_socket =
|
| static_cast<HttpProxyClientSocket*>(connection_->socket());
|
| const HttpResponseInfo* tunnel_auth_response =
|
| - http_proxy_socket->GetResponseInfo();
|
| + http_proxy_socket->GetConnectResponseInfo();
|
|
|
| next_state_ = STATE_WAITING_USER_ACTION;
|
| MessageLoop::current()->PostTask(
|
| @@ -273,6 +279,19 @@
|
| connection_->ssl_error_response_info().cert_request_info));
|
| return ERR_IO_PENDING;
|
|
|
| + case ERR_HTTPS_PROXY_TUNNEL_RESPONSE: {
|
| + LOG(INFO) << "Creating stream";
|
| + scoped_ptr<ProxyClientSocket> proxy_socket(
|
| + connection_->release_https_proxy_tunnel_response_socket());
|
| + MessageLoop::current()->PostTask(
|
| + FROM_HERE,
|
| + method_factory_.NewRunnableMethod(
|
| + &HttpStreamRequest::OnHttpsProxyTunnelResponseCallback,
|
| + connection_->ssl_error_response_info(),
|
| + proxy_socket->CreateConnectResponseStream()));
|
| + return ERR_IO_PENDING;
|
| + }
|
| +
|
| case OK:
|
| next_state_ = STATE_DONE;
|
| MessageLoop::current()->PostTask(
|
| @@ -744,7 +763,8 @@
|
| if (!using_spdy_) {
|
| bool using_proxy = (proxy_info()->is_http() || proxy_info()->is_https()) &&
|
| request_info().url.SchemeIs("http");
|
| - stream_.reset(new HttpBasicStream(connection_.release(), using_proxy));
|
| + stream_.reset(new HttpBasicStream(connection_.release(), NULL,
|
| + using_proxy));
|
| return OK;
|
| }
|
|
|
| @@ -792,8 +812,8 @@
|
| if (spdy_session->IsClosed())
|
| return ERR_CONNECTION_CLOSED;
|
|
|
| - bool useRelativeUrl = direct || request_info().url.SchemeIs("https");
|
| - stream_.reset(new SpdyHttpStream(spdy_session, useRelativeUrl));
|
| + bool use_relative_url = direct || request_info().url.SchemeIs("https");
|
| + stream_.reset(new SpdyHttpStream(spdy_session, use_relative_url));
|
| return OK;
|
| }
|
|
|
|
|