deno
446377ee - fix(ext/node): http2 createConnection support and per-frame socket writes (#33520)

Commit
216 days ago
fix(ext/node): http2 createConnection support and per-frame socket writes (#33520) ## Summary Lets `http2.connect({ createConnection })` accept a JS Duplex (e.g. the in-process duplex pair used by `parallel/test-http2-padding-aligned.js`) without the previous placeholder `JSStreamSocket` raising `socket.on is not a function`. The polyfill now drives the wrapped Duplex directly through its `on('data')` / `write()` interface; the Rust nghttp2 driver gains a `get_outgoing_chunk` op so the JS send path issues one `socket.write` per `nghttp2_session_mem_send` return, matching the per-`uv_buf_t` wire boundaries the libuv `consume_stream` path already produces. `tests/node_compat/runner/suite/test/parallel/test-http2-padding-aligned.js` is added to the config as `ignore: true` with a reason: the test asserts byte-exact frame counts that additionally require Node's `NGHTTP2_DATA_FLAG_NO_COPY` + `send_data_callback` infrastructure to split DATA frames into header/pad_length/payload/padding chunks and match Node's exact send ordering, which is significant new infra and out of scope here. ## Test plan - [x] `nix develop -c cargo test --test node_compat -- test-http2-padding-aligned` (now ignored) - [x] `nix develop -c cargo test --test node_compat` — no http2 regressions; pre-existing unrelated failures only --------- Co-authored-by: divybot <divybot@users.noreply.github.com> Co-authored-by: Divy Srivastava <me@littledivy.com>
Author
Parents
Loading