Fix oghttp2 to handle the submission of trailers after sending data with END_STREAM.

This CL updates OgHttp2Session::WriteForStream() to gracefully handle the
scenario of having pending trailers to write after writing a DATA frame with
the END_STREAM flag, which locally half-closes the stream. This scenario can
arise if the user calls SubmitTrailers() for a stream that also has a
DataFrameSource with send_fin() true. Before, OgHttp2Session would infinite
loop. With this change, OgHttp2Session will instead close the stream with
INTERNAL_ERROR.

Note that the new oghttp2 behavior is still a functional diff from nghttp2
behavior, which appears to drop the data source (including pending body) when
trailers are submitted. OgHttp2Session prioritizes writing the body (and
trailers if submitted without signaling END_STREAM on the body) over writing
the trailers.

This change resolves a fuzzing bug with oghttp2.

This CL also adds trace logging for the sending of DATA frames.

PiperOrigin-RevId: 567320945
3 files changed
tree: 1dbfd6b9983afa1276395e3554e9aceb5f08f5cf
  1. build/
  2. depstool/
  3. quiche/
  4. .bazelrc
  5. BUILD.bazel
  6. CONTRIBUTING.md
  7. LICENSE
  8. README.md
  9. WHITESPACE
  10. WORKSPACE.bazel
README.md

QUICHE

QUICHE stands for QUIC, Http, 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.