Index: net/http/http_stream_factory_impl_job_controller.cc |
diff --git a/net/http/http_stream_factory_impl_job_controller.cc b/net/http/http_stream_factory_impl_job_controller.cc |
index ec3827716e372fb5e2cbb3acd66e36433f4114aa..a48549074e8720b583b83e430d35e8916130f823 100644 |
--- a/net/http/http_stream_factory_impl_job_controller.cc |
+++ b/net/http/http_stream_factory_impl_job_controller.cc |
@@ -950,6 +950,13 @@ HttpStreamFactoryImpl::JobController::GetAlternativeServiceFor( |
} |
UMA_HISTOGRAM_ENUMERATION("Net.AlternativeServiceTypeForRequest", type, |
MAX_ALTERNATIVE_SERVICE_TYPE); |
+ |
+ // TODO(bnc): https://crbug.com/615413 Re-enable HTTP/2 Alternative Services. |
+ if (alternative_service.protocol == kProtoHTTP2 && |
+ !session_->params().enable_http2_alternative_service) { |
+ return AlternativeService(); |
+ } |
Ryan Hamilton
2017/04/13 21:53:45
I don't understand why we want to move this here i
Bence
2017/04/14 01:10:16
Sure. If it's in GetAlternativeServiceForInternal
Ryan Hamilton
2017/04/14 02:49:13
In that case, perhaps we need a new histogram for
Bence
2017/04/17 11:29:46
Oops, I wasn't aware of that, sorry. Let me just
|
+ |
return alternative_service; |
} |
@@ -988,7 +995,6 @@ HttpStreamFactoryImpl::JobController::GetAlternativeServiceForInternal( |
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 |
@@ -1002,12 +1008,6 @@ HttpStreamFactoryImpl::JobController::GetAlternativeServiceForInternal( |
continue; |
if (alternative_service.protocol == kProtoHTTP2) { |
- if (origin.host() != alternative_service.host && |
- !session_->params() |
- .enable_http2_alternative_service_with_different_host) { |
- continue; |
- } |
- |
// Cache this entry if we don't have a non-broken Alt-Svc yet. |
if (first_alternative_service.protocol == kProtoUnknown) |
first_alternative_service = alternative_service; |