Files
scriptc/tests/diagnostics/http2-response-trailers.ts
Chris Tate c8b42772a8 fix(http): enforce HTTP/1.1 Host requirement (#388)
* fix(http): enforce HTTP/1.1 Host requirement

- Enforce Node's default Host behavior while preserving opt-out and HTTP/1.0 handling.

- Match the 400 wire response and add C/LLVM differential coverage.

* feat(http): add static HTTP trailer and streaming support

- Parse incoming chunk trailers and expose distinct/raw trailer reads.
- Frame outgoing trailers and add streaming controls with differential coverage.

* fix(http): harden request trailer parsing

- Safely discard trailers after early responses while preserving parser validation.
- Bound aggregate head and trailer parsing by bytes and field count.
- Add regressions for early response trailers and overflow rejection.
2026-09-23 10:21:53 -05:00

7 lines
134 B
TypeScript

import { createServer } from "node:http2";
createServer((_req, res) => {
res.addTrailers({ "X-Later": "x" });
res.end("ok");
});