Skip to content

WebTransport and HTTP Datagram Support#629

Draft
dtikhonov wants to merge 216 commits intomasterfrom
202601241123-web-transport-suport
Draft

WebTransport and HTTP Datagram Support#629
dtikhonov wants to merge 216 commits intomasterfrom
202601241123-web-transport-suport

Conversation

@dtikhonov
Copy link
Copy Markdown
Collaborator

@dtikhonov dtikhonov commented Mar 16, 2026

This PR adds first-class WebTransport over HTTP/3 support to lsquic, including
transport pieces needed to run real applications (devious baton), plus
HTTP Datagram integration and RESET_STREAM_AT plumbing.

What this delivers

1) WebTransport support (major feature)

  • New public API in include/lsquic_wt.h for:
    • session establishment/acceptance
    • WT stream lifecycle (bidi + uni)
    • WT datagram send/receive
    • app callback interface (lsquic_webtransport_if)
  • CONNECT-based WT session handoff in server flow (via handler dispatch), with
    baton wired as the first concrete application.
  • Support for concurrent WT sessions and stream/session bookkeeping in connection code.
  • Stream-core/WT decoupling improvements so WT logic lives in WT layer, not stream internals.

2) HTTP Datagram integration

  • End-to-end HTTP Datagram read/write path integrated with WT.
  • WT datagram API supports immediate send + internal buffering.
  • Configurable queue behavior (policy/limits), with fallback behavior for large payloads.
  • Non-WT datagrams continue to route to default engine-level handler when configured.

3) RESET_STREAM_AT plumbing

  • WT-related deferred reset plumbing integrated with RESET_STREAM_AT support path.
  • Related stream/reset handling paths were tightened to avoid reentrancy and lifecycle hazards.

Protocol / draft alignment

  • Updated implementation toward current WebTransport draft behavior (including settings/TP handling),
    while retaining compatibility needed for interop with draft-14 style peers where practical.

Tooling and application support

  • Devious baton implementation under bin/ and integration with http_server baton mode.
  • Client/server behavior and logs improved for protocol observability and debugging.

Validation

  • Build coverage includes core lib + WT-facing tools/tests.
  • test_wt and baton flows exercised.
  • Interop exercised against external servers (including draft skew scenarios).

Why this is a single PR

This is intentionally a feature PR, not a refactor-only PR:
WebTransport requires coordinated changes across public API, stream/conn internals,
HTTP Datagram handling, settings negotiation, and application wiring.

Issue references

dtikhonov and others added 30 commits January 17, 2026 12:15
BAT (Bidirectional Attestation Test) is a simple echo protocol for
testing HTTP Datagrams (RFC 9297) implementations. Modeled after
SiDUCK (draft-pardue-quic-siduck), BAT provides:

- Simple echo service over HTTP CONNECT
- Support for QUIC DATAGRAM frames (HTTP/3)
- Support for DATAGRAM Capsules (all HTTP versions)
- Protocol identifier: bat-00
- Testing tool for HTTP Datagram interoperability
Add first-class HTTP Datagram support for HTTP/3, aligned with RFC
9297.  The implementation handles QUIC DATAGRAM transport as well as
Capsule Protocol encapsulation when datagrams cannot fit the QUIC path,
providing a complete end-to-end feature for this new extension.

Core stream and connection logic now parses and emits HTTP Datagram frames
and capsules per RFC 9297 rules, including Quarter Stream ID handling
and strict error signaling.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@litespeedtech litespeedtech deleted the 202601241123-web-transport-suport branch April 22, 2026 20:22
@litespeedtech litespeedtech restored the 202601241123-web-transport-suport branch April 22, 2026 20:36
@dtikhonov dtikhonov reopened this Apr 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for HTTP Datagrams (RFC 9297) Add support for WebTransport

3 participants