mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-21 05:50:55 +08:00
* feat(http): materialize static distinct header snapshots - Preserve precise string array types for whole incoming header and trailer collections. - Cover duplicate headers, trailers, and raw header reads against Node in both backends. - Refresh test-backed static HTTP compatibility claims. * feat(http): expand the static Node HTTP surface - Add HTTP module values, request and response lifecycle state, and socket controls. - Implement server timeout and connection shutdown behavior in the native runtime. - Cover C and LLVM behavior with Node differential fixtures, refresh compatibility evidence, and recover interrupted Sandbox streams. * fix(http): honor message timeout handlers - Keep server sockets open when request or response timeout listeners handle the event. - Add differential regressions and refresh the TypeScript 7 order baseline.
15 lines
717 B
TypeScript
15 lines
717 B
TypeScript
import * as http from "node:http";
|
|
import { METHODS, STATUS_CODES, maxHeaderSize } from "node:http";
|
|
|
|
console.log("methods", METHODS.join("|"));
|
|
console.log("namespace", http.METHODS[0], http.METHODS[http.METHODS.length - 1]);
|
|
console.log("header limit", maxHeaderSize, http.maxHeaderSize);
|
|
console.log("status", STATUS_CODES[200], STATUS_CODES[418], http.STATUS_CODES[511], STATUS_CODES[299] === undefined);
|
|
console.log("shared", METHODS === http.METHODS, STATUS_CODES === http.STATUS_CODES);
|
|
const originalMethod = METHODS[0]!;
|
|
METHODS[0] = "CUSTOM";
|
|
console.log("method mutation", http.METHODS[0]);
|
|
METHODS[0] = originalMethod;
|
|
STATUS_CODES[299] = "Custom";
|
|
console.log("status mutation", http.STATUS_CODES[299]);
|