test: Fix simple/test-http-localaddress

This commit is contained in:
isaacs 2012-12-21 16:59:20 +00:00
parent fb915ed957
commit 0edd93dcc1
2 changed files with 3 additions and 0 deletions

View File

@ -33,6 +33,7 @@ var server = http.createServer(function(req, res) {
res.writeHead(200, { 'Content-Type': 'text/plain' });
res.end('You are from: ' + req.connection.remoteAddress);
});
req.resume();
});
server.listen(common.PORT, "127.0.0.1", function() {

View File

@ -36,6 +36,7 @@ var server = http.createServer(function (req, res) {
res.writeHead(200, { 'Content-Type': 'text/plain' });
res.end('You are from: ' + req.connection.remoteAddress);
});
req.resume();
});
server.listen(common.PORT, "127.0.0.1", function() {
@ -50,6 +51,7 @@ server.listen(common.PORT, "127.0.0.1", function() {
server.close();
process.exit();
});
res.resume();
});
req.end();
});