commit | 21bbf1cd55a465bd2ac34b1e469a3135ca77c4fb | [log] [tgz] |
---|---|---|
author | bnc <bnc@google.com> | Tue Sep 28 11:24:08 2021 -0700 |
committer | Copybara-Service <copybara-worker@google.com> | Tue Sep 28 11:24:50 2021 -0700 |
tree | 8098d1c1f8a89c20a34ca6101db79ae9b2b8e04e | |
parent | 453bda8fea991fd1a333fa5326b1afbcfeaafe5d [diff] |
Simplify HttpDecoder state transitions. Both before and after this CL, non-buffered frames go through the following states: STATE_READING_FRAME_LENGTH STATE_READING_FRAME_TYPE STATE_READING_FRAME_PAYLOAD STATE_FINISH_PARSING They skip STATE_READING_FRAME_PAYLOAD if the payload is empty. Before this CL, buffered frames normally skip STATE_FINISH_PARSING, except they skip STATE_READING_FRAME_PAYLOAD if payload is empty just like non-buffered states, and therefore they have to go through STATE_FINISH_PARSING. ReadFramePayload() corresponds to STATE_READING_FRAME_PAYLOAD and FinishParsing() corresponds to STATE_FINISH_PARSING, and states are only changed in methods that correspond to states, except for the helper BufferOrParsePayload() which does not have a corresponding state but can still change the state, which its caller must detect. After this CL, the states STATE_READING_FRAME_PAYLOAD and STATE_FINISH_PARSING only process non-buffered frames, and buffered frames go through a dedicated new state STATE_BUFFER_OR_PARSE_PAYLOAD. The state transition path forks in ReadFrameLength(). BufferOrParsePayload() gets promoted from a random helper called from other methods to a method corresponding to a state, called from ProcessInput() which drives the state machine. State transitions are now cleaner. PiperOrigin-RevId: 399487182
QUICHE stands for QUIC, Http/2, Etc. It is Google‘s production-ready implementation of QUIC, HTTP/2, HTTP/3, and related protocols and tools. It powers Google’s servers, Chromium, Envoy, and other projects. It is actively developed and maintained.
There are two public QUICHE repositories. Either one may be used by embedders, as they are automatically kept in sync:
To embed QUICHE in your project, platform APIs need to be implemented and build files need to be created. Note that it is on the QUICHE team's roadmap to include default implementation for all platform APIs and to open-source build files. In the meanwhile, take a look at open source embedders like Chromium and Envoy to get started:
To contribute to QUICHE, follow instructions at CONTRIBUTING.md.
QUICHE is only supported on little-endian platforms.