mirror of https://github.com/nodejs/node.git
http: fix test-http-should-keepalive.js is fail
3df7c90
was removed when conflict was resolved.
pull/5370/head
parent
b1b16d117e
commit
a6f3451e25
|
@ -1306,8 +1306,7 @@ ClientRequest.prototype.onSocket = function(socket) {
|
|||
return true;
|
||||
}
|
||||
|
||||
if (req.shouldKeepAlive && res.headers.connection !== 'keep-alive' &&
|
||||
!req.upgradeOrConnect) {
|
||||
if (req.shouldKeepAlive && !shouldKeepAlive && !req.upgradeOrConnect) {
|
||||
// Server MUST respond with Connection:keep-alive for us to enable it.
|
||||
// If we've been upgraded (via WebSockets) we also shouldn't try to
|
||||
// keep the connection open.
|
||||
|
|
Loading…
Reference in New Issue