Avoid sending frames after sending an immediate GOAWAY in OgHttp2Session.

This CL makes the following related changes to OgHttp2Session:
  - Add a queued_immediate_goaway_ field, set if the enqueued GOAWAY is the
    result of a connection-level error (i.e., if latched_error_ is true).
  - Make EnqueueFrame() a no-op if queued_immediate_goaway_ is true.
  - Avoid writing for streams if queued_immediate_goaway_ is true.

These changes allow OgHttp2Session to avoid sending either control frames or
DATA frames once a GOAWAY is sent.

This CL also fixes a potential memory leak in NgHttp2Adapter with submitted
METADATA that is now also not sent after an immediate GOAWAY. In particular,
MetadataSource now has a new interface method OnFailure() that
SelfDeletingMetadataSource() can override to self-delete.
MetadataSource::OnFailure() is now called in
nghttp2_on_frame_not_send_callback() (newly set to call new OnFrameNotSent()).

This CL marks the triumphant passing of codec_impl_test

PiperOrigin-RevId: 417475633
9 files changed
tree: da83e4e100607a750706e7b5f6dc4a6a15344a34
  1. common/
  2. epoll_server/
  3. http2/
  4. quic/
  5. spdy/
  8. README.md


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.