Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

3df7c90 was removed when conflict was resolved.
  • Loading branch information...
commit a6f3451e2549d0b82ff18990e8bfe28ea4386aba 1 parent b1b16d1
@koichik koichik authored
Showing with 1 addition and 2 deletions.
  1. +1 −2  lib/http.js
View
3  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.
Please sign in to comment.
Something went wrong with that request. Please try again.