| Index: net/http/http_stream_factory_impl.cc
|
| diff --git a/net/http/http_stream_factory_impl.cc b/net/http/http_stream_factory_impl.cc
|
| index 68eb6afaf26a967b65b781ca01d5c0d8cf88950a..2a8664e51a6458ed9d087582066a943a03552c27 100644
|
| --- a/net/http/http_stream_factory_impl.cc
|
| +++ b/net/http/http_stream_factory_impl.cc
|
| @@ -152,9 +152,6 @@ const HostMappingRules* HttpStreamFactoryImpl::GetHostMappingRules() const {
|
|
|
| AlternativeServiceVector HttpStreamFactoryImpl::GetAlternativeServicesFor(
|
| const GURL& original_url) {
|
| - if (!session_->params().use_alternative_services)
|
| - return AlternativeServiceVector();
|
| -
|
| if (original_url.SchemeIs("ftp"))
|
| return AlternativeServiceVector();
|
|
|
| @@ -166,6 +163,9 @@ AlternativeServiceVector HttpStreamFactoryImpl::GetAlternativeServicesFor(
|
| if (alternative_service_vector.empty())
|
| return AlternativeServiceVector();
|
|
|
| + const bool enable_different_host =
|
| + session_->params().use_alternative_services;
|
| +
|
| AlternativeServiceVector enabled_alternative_service_vector;
|
| for (const AlternativeService& alternative_service :
|
| alternative_service_vector) {
|
| @@ -176,6 +176,9 @@ AlternativeServiceVector HttpStreamFactoryImpl::GetAlternativeServicesFor(
|
| continue;
|
| }
|
|
|
| + if (origin.host() != alternative_service.host && !enable_different_host)
|
| + continue;
|
| +
|
| // Some shared unix systems may have user home directories (like
|
| // http://foo.com/~mike) which allow users to emit headers. This is a bad
|
| // idea already, but with Alternate-Protocol, it provides the ability for a
|
|
|