Handle new/pending streams on receipt of a GOAWAY in oghttp2.

This CL is a follow-up to cl/439588951, which handled the receipt of a GOAWAY
for active streams. This CL handles the receipt of a GOAWAY for new/pending
streams with stream IDs above the received GOAWAY's last_stream_id by adding
those stream IDs to a new set in OgHttp2Session and delivering OnCloseStream()
events for those streams in the next write.

This choice was motivated by the nghttp2_submit_request() (and thus
SubmitRequest()) API, which requires returning a stream ID even after receipt
of a GOAWAY. Note that simply closing the pending streams on GOAWAY would be
insufficient, as subsequent calls to SubmitRequest() could result in new or
newly pending streams. Therefore, this CL instead decides to unify handling for
new/pending streams by catching them in the common StartNewRequest() method.
Because the OnCloseStream() is delivered on the next write attempt, this CL
also updates want_write() to account for these GOAWAY-rejected streams.

This change increases oghttp2 parity with nghttp2.

PiperOrigin-RevId: 440989445
4 files changed
tree: 5847d927cb489a62b583f1bdea82ef3290b164be
  1. quiche/
  2. CONTRIBUTING.md
  3. LICENSE
  4. README.md
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.