Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
http: fix test-http-should-keepalive.js is fail
Browse files Browse the repository at this point in the history
3df7c90 was removed when conflict was resolved.
  • Loading branch information
koichik committed Jan 24, 2012
1 parent b1b16d1 commit a6f3451
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/http.js
Expand Up @@ -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.
Expand Down

0 comments on commit a6f3451

Please sign in to comment.