Chromium Code Reviews| 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 24d6e161d8fa4f8a1e4b82ad5960db385175222d..1823a0bb8ef90a6829a430a1182cb60a045bb55e 100644 |
| --- a/net/http/http_stream_factory_impl_job_controller.cc |
| +++ b/net/http/http_stream_factory_impl_job_controller.cc |
| @@ -1151,7 +1151,17 @@ HttpStreamFactoryImpl::JobController::GetAlternativeServiceInfoInternal( |
| if (session_->quic_stream_factory()->CanUseExistingSession(server_id, |
| destination)) { |
| - return alternative_service_info; |
| + // If advertised versions for QUIC is missing for this |
| + // AlternaitverServiceInfo, by default append the list of QUIC versions |
|
Bence
2017/06/08 17:44:51
s/AlternaitverServiceInfo/AlternativeServiceInfo/
Zhongyi Shi
2017/06/08 23:11:16
Acknowledged.
|
| + // supported by this instance of network stack. |
| + first_alternative_service_info = alternative_service_info; |
| + if (first_alternative_service_info.alternative_service.protocol == |
| + kProtoQUIC && |
| + first_alternative_service_info.advertised_versions().empty()) { |
| + first_alternative_service_info.set_advertised_versions( |
| + session_->params().quic_supported_versions); |
| + } |
|
Ryan Hamilton
2017/06/07 20:52:24
I wonder if we can get away without this code. If
Zhongyi Shi
2017/06/08 23:11:16
Ah good idea! I didn't think about this. But yeah,
|
| + return first_alternative_service_info; |
| } |
| // Cache this entry if we don't have a non-broken Alt-Svc yet. |
| @@ -1164,6 +1174,16 @@ HttpStreamFactoryImpl::JobController::GetAlternativeServiceInfoInternal( |
| if (quic_advertised && quic_all_broken && delegate != nullptr) |
| delegate->OnQuicBroken(); |
| + // If advertised versions for QUIC is missing for this |
| + // AlternaitverServiceInfo, by default append the list of QUIC versions |
| + // supported by this instance of network stack. |
| + if (first_alternative_service_info.alternative_service.protocol == |
| + kProtoQUIC && |
| + first_alternative_service_info.advertised_versions().empty()) { |
| + first_alternative_service_info.set_advertised_versions( |
| + session_->params().quic_supported_versions); |
| + } |
| + |
| return first_alternative_service_info; |
| } |