mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-02 08:35:07 +08:00
* 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.
7 lines
134 B
TypeScript
7 lines
134 B
TypeScript
import { createServer } from "node:http2";
|
|
|
|
createServer((_req, res) => {
|
|
res.addTrailers({ "X-Later": "x" });
|
|
res.end("ok");
|
|
});
|