Skip to content

Commit df52442

Browse files
committed
feat(#4086): keep alive on CONNECT
1 parent 1866f1f commit df52442

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

lib/dispatcher/client-h1.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1101,7 +1101,7 @@ function writeH1 (client, request) {
11011101
socket[kReset] = true
11021102
}
11031103

1104-
if (upgrade || method === 'CONNECT') {
1104+
if (upgrade) {
11051105
// On CONNECT or upgrade, block pipeline from dispatching further
11061106
// requests on this connection.
11071107

test/proxy-agent.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ test('ProxyAgent correctly sends headers when using fetch - #1355, #1623', async
520520

521521
const expectedProxyHeaders = {
522522
host: `localhost:${server.address().port}`,
523-
connection: 'close'
523+
connection: 'keep-alive'
524524
}
525525

526526
proxy.on('connect', (req, res) => {

0 commit comments

Comments
 (0)