deno
5254b88e - fix(ext/node): http2 improvements — constants, error codes, settings, validation (#33332)

Commit
124 days ago
fix(ext/node): http2 improvements — constants, error codes, settings, validation (#33332) ## Summary - **Inline HTTP/2 constants in JS** — removed `op_http2_constants` Rust op (all values are compile-time constants, no need for serde/v8 serialization) - **Fix missing error codes** — register `ERR_HTTP2_CONNECT_*`, `ERR_HTTP2_HEADER_SINGLE_VALUE`, `ERR_HTTP2_INVALID_CONNECTION_HEADERS`, `ERR_HTTP2_INVALID_PSEUDOHEADER`, `ERR_INVALID_HTTP_TOKEN` in the `codes` object; add missing imports in `http2.ts` - **Add `HideStackFramesError`** — static self-reference on `ERR_HTTP2_INVALID_HEADER_VALUE`, `ERR_HTTP2_PSEUDOHEADER_NOT_ALLOWED`, `ERR_INVALID_HTTP_TOKEN` (needed by compat.js `assertValidHeader`) - **Fix settings validation** — use correct `2^31-1` upper bound for `initialWindowSize` (per RFC 7540); fix `getUnpackedSettings` to handle TypedArray inputs correctly; reject DataView - **Implement `strictSingleValueFields`** — session option to disable single-value header validation, wired through all `buildNgHeaderString` call sites - **Fix compat.js** — match Node's `assertValidPseudoHeader` usage and `this.destroy()` for invalid tokens --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Author
Parents
Loading