From 70ffdf5db9d687b4a68d8feb53c5e7de338cdd85 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Tue, 23 Mar 2010 21:10:01 -0700 Subject: [PATCH] Fix HTTP keep-alive --- lib/http.js | 2 +- test/pummel/test-keep-alive.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/http.js b/lib/http.js index e230ae42743..2758298f9dc 100644 --- a/lib/http.js +++ b/lib/http.js @@ -517,7 +517,7 @@ function connectionListener (socket) { var req = incoming; var res = new ServerResponse(req); - res.shouldKeepAlive = shouldKeepAlive; + res.should_keep_alive = shouldKeepAlive; res.addListener('flush', function () { if (flushMessageQueue(socket, responses)) { socket.close(); diff --git a/test/pummel/test-keep-alive.js b/test/pummel/test-keep-alive.js index cf31c1eb63b..d52f06659b1 100644 --- a/test/pummel/test-keep-alive.js +++ b/test/pummel/test-keep-alive.js @@ -1,7 +1,7 @@ // This test requires the program "ab" require("../common"); http = require("http"); -sys = require("sys"); +exec = require("child_process").exec; body = "hello world\n"; server = http.createServer(function (req, res) { @@ -20,7 +20,7 @@ var normalReqSec = 0; function runAb(opts, callback) { var command = "ab " + opts + " http://127.0.0.1:" + PORT + "/"; - sys.exec(command, function (err, stdout, stderr) { + exec(command, function (err, stdout, stderr) { if (err) { puts("ab not installed? skipping test.\n" + stderr); process.exit();