SpdySession should check version support when process QUIC alternative service |
|||
Issue description
SpdySession currently saves Quic alternative service to HttpServerProperties without checking whether the Quic version advertised by the server is supported by the client. This will lead us to create unnecessary QUIC connections if the version is actually not supported.
Additionally, HttpStreamFactory::ProcessAlternativeService() does the version check, we should probably consider factory parsing into a single function that could be used in both places.
void SpdySession::OnAltSvc(...) {
...
for (const SpdyAltSvcWireFormat::AlternativeService& altsvc : altsvc_vector) {
const NextProto protocol = NextProtoFromString(altsvc.protocol_id);
if (protocol == kProtoUnknown)
continue;
const AlternativeService alternative_service(protocol, altsvc.host,
altsvc.port);
const base::Time expiration =
now + base::TimeDelta::FromSeconds(altsvc.max_age);
alternative_service_info_vector.push_back( <------ no filtering on version field
AlternativeServiceInfo(alternative_service, expiration));
}
http_server_properties_->SetAlternativeServices(
scheme_host_port, alternative_service_info_vector);
...
}
,
Jun 26 2017
,
Jun 26 2017
We may also consider factoring the QUIC version filtering logic into a single method so that SpdySession and HttpStreamFactor::ProcessAlternativeService could call the same method.
,
Jul 6 2017
|
|||
►
Sign in to add a comment |
|||
Comment 1 by bugdroid1@chromium.org
, Jun 26 2017