Skip to content

Commit f5355c2

Browse files
committed
fix: only call onProxyTrailers in http/1 mode
1 parent 3c07557 commit f5355c2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,10 +278,12 @@ function onProxyResponse (proxyRes) {
278278
}
279279

280280
res.writeHead(res.statusCode)
281+
282+
proxyRes
283+
.on('end', onProxyTrailers)
281284
}
282285

283286
proxyRes
284-
.on('end', onProxyTrailers)
285287
.on('error', onFinish)
286288
.pipe(res)
287289
}

0 commit comments

Comments
 (0)