Skip to content

Commit 0005317

Browse files
nodejs-github-bottargos
authored andcommitted
deps: update undici to 5.26.4
PR-URL: #50274 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
1 parent c40de82 commit 0005317

10 files changed

Lines changed: 15484 additions & 116 deletions

File tree

‎deps/undici/src/docs/api/DispatchInterceptor.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#Interface: DispatchInterceptor
1+
#Interface: DispatchInterceptor
22

33
Extends: `Function`
44

‎deps/undici/src/lib/api/api-stream.js‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@ class StreamHandler extends AsyncResource {
104104
{ callback,body: res, contentType, statusCode, statusMessage, headers }
105105
)
106106
}else{
107+
if(factory===null){
108+
return
109+
}
110+
107111
res=this.runInAsyncScope(factory,null,{
108112
statusCode,
109113
headers,
@@ -152,14 +156,18 @@ class StreamHandler extends AsyncResource {
152156
onData(chunk){
153157
const{ res }=this
154158

155-
returnres.write(chunk)
159+
returnres ? res.write(chunk) : true
156160
}
157161

158162
onComplete(trailers){
159163
const{ res }=this
160164

161165
removeSignal(this)
162166

167+
if(!res){
168+
return
169+
}
170+
163171
this.trailers=util.parseHeaders(trailers)
164172

165173
res.end()

‎deps/undici/src/lib/api/readable.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ function consumeEnd (consume) {
268268
pos+=buf.byteLength
269269
}
270270

271-
resolve(dst)
271+
resolve(dst.buffer)
272272
}elseif(type==='blob'){
273273
if(!Blob){
274274
Blob=require('buffer').Blob

‎deps/undici/src/lib/client.js‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1070,7 +1070,9 @@ function onParserTimeout (parser) {
10701070

10711071
functiononSocketReadable(){
10721072
const{[kParser]: parser}=this
1073-
parser.readMore()
1073+
if(parser){
1074+
parser.readMore()
1075+
}
10741076
}
10751077

10761078
functiononSocketError(err){

0 commit comments

Comments
 (0)