Browse Source

http: fix test-http-should-keepalive.js is fail

3df7c90 was removed when conflict was resolved.
v0.7.4-release
koichik 13 years ago
parent
commit
a6f3451e25
  1. 3
      lib/http.js

3
lib/http.js

@ -1306,8 +1306,7 @@ ClientRequest.prototype.onSocket = function(socket) {
return true; return true;
} }
if (req.shouldKeepAlive && res.headers.connection !== 'keep-alive' && if (req.shouldKeepAlive && !shouldKeepAlive && !req.upgradeOrConnect) {
!req.upgradeOrConnect) {
// Server MUST respond with Connection:keep-alive for us to enable it. // 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 // If we've been upgraded (via WebSockets) we also shouldn't try to
// keep the connection open. // keep the connection open.

Loading…
Cancel
Save