Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorkoichik <koichik@improvement.jp>2012-01-24 08:57:20 +0400
committerkoichik <koichik@improvement.jp>2012-01-24 08:57:20 +0400
commita6f3451e2549d0b82ff18990e8bfe28ea4386aba (patch)
tree80c86ffea42d620561aa5a949c3120aa0d871708 /lib
parentb1b16d117e6fe2ca889d10e7e0b62a5a60997d57 (diff)
http: fix test-http-should-keepalive.js is fail
3df7c90 was removed when conflict was resolved.
Diffstat (limited to 'lib')
-rw-r--r--lib/http.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/http.js b/lib/http.js
index 7ad7765a668..470981bb853 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.