Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 2 additions & 1 deletion lib/api/api-request.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -126,6 +126,7 @@ class RequestHandler extends AsyncResource {
try {
this.runInAsyncScope(callback, null, null, {
statusCode,
statusText,
headers: responseHeaderData,
trailers: this.trailers,
opaque,
Expand Down
48 changes: 15 additions & 33 deletions test/http2-dispatcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
})
Expand Down Expand Up @@ -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)
}
})
Expand Down Expand Up @@ -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)
}
})
Expand Down
Loading