Bug 2051272 Comment 0 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

Bug 1953464 made `nsHttpConnectionInfo::BuildHashKey` drop the routed host/port from the hash key when HE is enabled, so the alternate now shares the origin’s ConnectionEntry. As a side effect, the alternate’s connection info hashes identically to the origin’s, which breaks validation in two ways:

1. Validation is bypassed (h2 and h3): AltSvcMapping::ProcessHeader uses ci->HashKey().Equals(aTransConnInfo->HashKey()) as a skip check. With the new hash key behavior, that comparison now matches for every normal Alt-Svc header, so the mapping is treated as valid without actually being validated. Claim can also abort an in-flight validation attempt. This part is protocol-agnostic.
2. Validation can never complete (h2 only): if validation is forced, SpeculativeConnect reuses the origin’s entry, and ProcessTCPConn returns the H2 connection to the pool without binding it to the AltSvcTransaction. As a result, MaybeValidate fails its precondition: conn=0 ... Failed due to precondition. (ProcessUDPConn for h3 already activates the transaction, so for h3, MaybeValidate works once the bypass issue is fixed.)
Bug 1953464 made `nsHttpConnectionInfo::BuildHashKey` drop the routed host/port from the hash key when HE is enabled, so the alternate now shares the origin’s ConnectionEntry. As a side effect, the alternate’s connection info hashes identically to the origin’s, which breaks validation in two ways:

1. Validation is bypassed (h2 and h3): AltSvcMapping::ProcessHeader uses [ci->HashKey().Equals(aTransConnInfo->HashKey())](https://searchfox.org/firefox-main/rev/0c4c351481d11be32f41af409dbc59122bef80a2/netwerk/protocol/http/AlternateServices.cpp#230) as a skip check. With the new hash key behavior, that comparison now matches for every normal Alt-Svc header, so the mapping is treated as valid without actually being validated. Claim can also abort an in-flight validation attempt. This part is protocol-agnostic.
2. Validation can never complete (h2 only): if validation is forced, SpeculativeConnect reuses the origin’s entry, and ProcessTCPConn returns the H2 connection to the pool without binding it to the AltSvcTransaction. As a result, MaybeValidate fails its precondition: conn=0 ... Failed due to precondition. (ProcessUDPConn for h3 already activates the transaction, so for h3, MaybeValidate works once the bypass issue is fixed.)

Back to Bug 2051272 Comment 0