Avoid interim response handling for 101 Switching Protocols responses in BalsaFrame.

When updating SimpleHttpClient to set_use_interim_headers_callback(true) in
cl/527686928, I found that the client would not receive WebSocket payloads as
body after receiving the 101 response in some cases. This was likely because of
the state resetting in [1]. The resetting is consistent with 100 Continue
behavior and will likely also be helpful with 103 Early Hints (and other
interim responses), but is not helpful for Upgrade/101 Switching Protocols.

This CL special-cases 101 Switching Protocols, excluding these responses from
other interim response handling (involving OnInterimHeaders()), because 101
represents the "final" headers on the current protocol.

The added unit test fails without this change (missing, headers callback aside,
the body callbacks. Balsa instead consumes the entire message but only outputs
the header portion. Perhaps the body was erroneously considered as the start of
"final" headers).

[1] http://google3/third_party/quiche/balsa/balsa_frame.cc;l=857;rcl=524360383

PiperOrigin-RevId: 529163242
2 files changed
tree: 53692975418870224b3d8d9531edaded130c3859
  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.