Refactor handling of supported versions

This CL introduces ParsedQuicVersionIsValid and refactors AllSupportedVersions to use it. It slightly changes how ParseQuicVersionLabel ParseQuicVersionString work, but only in the parsing of invalid versions such as T043. This does not change the behavior of the GFE in practice because packets of these versions would either way be time-waited because T043 cannot be in the CurrentSupportedVersions list.

This CL also has a minor fix to QuicFramer to ensure that, when processing short headers, the decision to fill packet_number_length is based on the framer's version as opposed to the empty version in the short header. HasHeaderProtection returns false for the empty version meaning that packet_number_length would always be filled in where the code is changed by this CL. However, in versions that do support header protection, packet_number_length is filled in by RemoveHeaderProtection <http://shortn/_Pfz02eXtt7>, which is gated on the version from the framer <http://shortn/_HHqgFPW8lP>. Therefore this change does not change behavior.

gfe-relnote: refactor, no behavior change, not flag-protected
PiperOrigin-RevId: 289535913
Change-Id: I864a9f65c6dc23ea1665f49893476a44e3db1493
6 files changed
tree: 56eab85a7bef69210ca1e3036b7bbdc99371bc02
  1. common/
  2. epoll_server/
  3. http2/
  4. quic/
  5. spdy/
  6. CONTRIBUTING.md
  7. LICENSE
  8. README.md
README.md

QUICHE

QUICHE (QUIC, Http/2, Etc) is Google‘s implementation of QUIC and related protocols. It powers Chromium as well as Google’s QUIC servers and some other projects.