Chromium Code Reviews| Index: net/http/http_stream_factory_impl_job.cc |
| diff --git a/net/http/http_stream_factory_impl_job.cc b/net/http/http_stream_factory_impl_job.cc |
| index 1d09da79457183d2a5e19694c20d4d76a432fdec..8f5b3d2570d5995e3bd270e90f0dcdd8ed4276fd 100644 |
| --- a/net/http/http_stream_factory_impl_job.cc |
| +++ b/net/http/http_stream_factory_impl_job.cc |
| @@ -986,13 +986,16 @@ int HttpStreamFactoryImpl::Job::DoInitConnection() { |
| return ERR_NOT_IMPLEMENTED; |
| } |
| HostPortPair destination; |
| - std::string origin_host; |
| SSLConfig* ssl_config; |
| + GURL url(request_info_.url); |
| if (proxy_info_.is_quic()) { |
| // A proxy's certificate is expected to be valid for the proxy hostname. |
| destination = proxy_info_.proxy_server().host_port_pair(); |
| - origin_host = destination.host(); |
| ssl_config = &proxy_ssl_config_; |
| + url::Replacements<char> replacements; |
| + replacements.SetHost(destination.host().c_str(), |
| + url::Component(0, destination.host().length())); |
| + url = url.ReplaceComponents(replacements); |
|
Ryan Hamilton
2016/02/29 17:49:40
I would have thought you could just set this to ht
Buck
2016/02/29 19:03:01
Done.
|
| // If QUIC is disabled on the destination port, return error. |
| if (session_->quic_stream_factory()->IsQuicDisabled(destination.port())) |
| @@ -1003,12 +1006,12 @@ int HttpStreamFactoryImpl::Job::DoInitConnection() { |
| // for the origin of the request (in addition to being valid for the |
| // server itself). |
| destination = server_; |
| - origin_host = origin_url_.host(); |
| ssl_config = &server_ssl_config_; |
| } |
| + |
| int rv = |
| quic_request_.Request(destination, request_info_.privacy_mode, |
| - ssl_config->GetCertVerifyFlags(), origin_host, |
| + ssl_config->GetCertVerifyFlags(), url, |
| request_info_.method, net_log_, io_callback_); |
| if (rv == OK) { |
| using_existing_quic_session_ = true; |