commit | 9c0dd2848bdd20440b2187ccd59b9bc054089181 | [log] [tgz] |
---|---|---|
author | bnc <bnc@google.com> | Mon Feb 22 10:17:16 2021 -0800 |
committer | Copybara-Service <copybara-worker@google.com> | Mon Feb 22 10:18:50 2021 -0800 |
tree | e522302b59a20106c3bc8d4e4bf8bea5fba48b3b | |
parent | 2475cc8246d3e77e391347ae319f0ab9db132fb4 [diff] |
Unify and refactor frame type logic in receiving control stream. An error is signalled under exactly the same conditions, but the error code and message might change. In particular, a MAX_PUSH_ID or ACCEPT_CH frame received by the wrong endpoint as the first frame resulted in a QUIC_HTTP_MISSING_SETTINGS_FRAME, while a DATA or HEADERS as the first frame resulted in a QUIC_HTTP_FRAME_UNEXPECTED_ON_CONTROL_STREAM before this CL. After this CL, any forbidden frame type (for the endpoint) results in QUIC_HTTP_FRAME_UNEXPECTED_ON_CONTROL_STREAM. Error messages are also changed to make the code simpler. OnUnrecoverableError() (used 2 times) is exactly the same as stream_delegate()->OnStreamError() (used 9 times), this CL changes both occurrences of the former into the latter for consistency. HttpDecoder::Visitor methods for frame processing other than *Start() cannot be called for disallowed frames, this CL adds QUICHE_NOTREACHED() to document that. The motivation is to prepare for changing the SETTINGS frame logic to accomodate a SETTINGS frame in ALPS, see https://vasilvv.github.io/httpbis-alps/draft-vvv-httpbis-alps.html#name-use-of-alps-in-http-3. PiperOrigin-RevId: 358846826 Change-Id: I0f361fa9899f1bd558603b804a6aad6f4f38b218
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. QUICHE is only supported on little-endian platforms.
Code can be viewed in CodeSearch in Quiche and is imported into Chromium.