From a6f3451e2549d0b82ff18990e8bfe28ea4386aba Mon Sep 17 00:00:00 2001 From: koichik Date: Tue, 24 Jan 2012 13:57:20 +0900 Subject: [PATCH] http: fix test-http-should-keepalive.js is fail 3df7c90 was removed when conflict was resolved. --- lib/http.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/http.js b/lib/http.js index 7ad7765a66..470981bb85 100644 --- a/lib/http.js +++ b/lib/http.js @@ -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.