diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8109c204e2b..83b53846a3f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -269,6 +269,8 @@ jobs: fail-fast: false max-parallel: 0 matrix: + # Node.js 22 is intentionally excluded here: --shared-builtin-undici/undici-path + # embedding is only validated for supported/current majors. node-version: ['24', '25'] runs-on: ['ubuntu-latest'] with: diff --git a/lib/api/api-request.js b/lib/api/api-request.js index b75a6dcae0e..dc944640332 100644 --- a/lib/api/api-request.js +++ b/lib/api/api-request.js @@ -87,7 +87,7 @@ class RequestHandler extends AsyncResource { this.context = context } - onResponseStart (controller, statusCode, headers, _statusMessage) { + onResponseStart (controller, statusCode, headers, statusText) { const { callback, opaque, context, responseHeaders, highWaterMark } = this const rawHeaders = controller?.rawHeaders @@ -126,6 +126,7 @@ class RequestHandler extends AsyncResource { try { this.runInAsyncScope(callback, null, null, { statusCode, + statusText, headers: responseHeaderData, trailers: this.trailers, opaque, diff --git a/test/http2-dispatcher.js b/test/http2-dispatcher.js index 0c85fc2afab..bef6c623e55 100644 --- a/test/http2-dispatcher.js +++ b/test/http2-dispatcher.js @@ -511,19 +511,13 @@ test('Should send http2 PING frames', async t => { method: 'PUT', body: 'hello' }, { - onConnect () { - - }, - onHeaders () { - return true - }, - onData () { - return true - }, - onComplete (trailers) { + onRequestStart () {}, + onResponseStart () {}, + onResponseData () {}, + onResponseEnd (_controller, trailers) { t.strictEqual(trailers['x-trailer'], 'hello') }, - onError (err) { + onResponseError (_controller, err) { t.ifError(err) } }) @@ -588,19 +582,13 @@ test('Should not send http2 PING frames if interval === 0', async t => { method: 'PUT', body: 'hello' }, { - onConnect () { - - }, - onHeaders () { - return true - }, - onData () { - return true - }, - onComplete (trailers) { + onRequestStart () {}, + onResponseStart () {}, + onResponseData () {}, + onResponseEnd (_controller, trailers) { t.strictEqual(trailers['x-trailer'], 'hello') }, - onError (err) { + onResponseError (_controller, err) { t.ifError(err) } }) @@ -666,19 +654,13 @@ test('Should not send http2 PING frames after connection is closed', async t => method: 'PUT', body: 'hello' }, { - onConnect () { - - }, - onHeaders () { - return true - }, - onData () { - return true - }, - onComplete (trailers) { + onRequestStart () {}, + onResponseStart () {}, + onResponseData () {}, + onResponseEnd (_controller, trailers) { t.strictEqual(trailers['x-trailer'], 'hello') }, - onError (err) { + onResponseError (_controller, err) { t.ifError(err) } })