Skip to content

feat: HTTP Trailers (RFC 9110 §6.5) across H1.1, H2, H3#49

Merged
st0o0 merged 14 commits into
release-nextfrom
feat/http-trailers
Jun 23, 2026
Merged

feat: HTTP Trailers (RFC 9110 §6.5) across H1.1, H2, H3#49
st0o0 merged 14 commits into
release-nextfrom
feat/http-trailers

Conversation

@st0o0

@st0o0 st0o0 commented Jun 23, 2026

Copy link
Copy Markdown
Member

Summary

  • H1.1 server trailer sending — chunked transfer encoding trailer section after final 0\r\n chunk (RFC 9112 §7.1.2). Kestrel does not support this — our differentiator.
  • H3 server trailer sending — QPACK-encoded trailing HEADERS frame before QUIC FIN (RFC 9114 §4.1)
  • H2 server bug fixes — buffered-body path bypassed trailer emission; client body reader hung when trailers arrived (DATA endStream:false → HEADERS END_STREAM)
  • SetReadOnly freeze semantics — trailer dictionaries frozen before wire encoding across all protocols, matching Kestrel's pattern
  • IHttpRequestTrailersFeature — server-side request trailer access with Available guard (throws before body consumed)
  • Trailer header auto-generation — H1.1 auto-adds Trailer: response header listing field names when not explicitly set (RFC 9110 §6.6.2)
  • Client-side verification — gap-fill tests confirming HttpResponseMessage.TrailingHeaders works across all protocols

Test plan

  • 5866 unit+stage tests pass (0 failures)
  • 111 E2E integration tests pass (H1.1: 4 trailer, H2: 3 trailer, H3: 2 trailer + existing)
  • 474 client integration tests pass
  • 89 server integration tests pass
  • Total: 6540 tests, 0 failures
  • H1.1 trailer round-trip: server sets trailers → client reads TrailingHeaders after body
  • H2 trailer round-trip: gRPC status/message trailers pass through
  • H3 trailer round-trip: QPACK-encoded trailers before QUIC FIN
  • Prohibited fields filtered by TrailerFieldValidator
  • All-prohibited trailers → no stream hang (H2 fallback to endStream:true)

@st0o0
st0o0 force-pushed the feat/http-trailers branch from 7107a62 to 98555a1 Compare June 23, 2026 11:02
@st0o0
st0o0 merged commit 4455ac8 into release-next Jun 23, 2026
3 checks passed
@st0o0
st0o0 deleted the feat/http-trailers branch June 23, 2026 12:05
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.

1 participant