test: Fix simple/test-http-localaddress
This commit is contained in:
parent
fb915ed957
commit
0edd93dcc1
@ -33,6 +33,7 @@ var server = http.createServer(function(req, res) {
|
|||||||
res.writeHead(200, { 'Content-Type': 'text/plain' });
|
res.writeHead(200, { 'Content-Type': 'text/plain' });
|
||||||
res.end('You are from: ' + req.connection.remoteAddress);
|
res.end('You are from: ' + req.connection.remoteAddress);
|
||||||
});
|
});
|
||||||
|
req.resume();
|
||||||
});
|
});
|
||||||
|
|
||||||
server.listen(common.PORT, "127.0.0.1", function() {
|
server.listen(common.PORT, "127.0.0.1", function() {
|
||||||
|
@ -36,6 +36,7 @@ var server = http.createServer(function (req, res) {
|
|||||||
res.writeHead(200, { 'Content-Type': 'text/plain' });
|
res.writeHead(200, { 'Content-Type': 'text/plain' });
|
||||||
res.end('You are from: ' + req.connection.remoteAddress);
|
res.end('You are from: ' + req.connection.remoteAddress);
|
||||||
});
|
});
|
||||||
|
req.resume();
|
||||||
});
|
});
|
||||||
|
|
||||||
server.listen(common.PORT, "127.0.0.1", function() {
|
server.listen(common.PORT, "127.0.0.1", function() {
|
||||||
@ -50,6 +51,7 @@ server.listen(common.PORT, "127.0.0.1", function() {
|
|||||||
server.close();
|
server.close();
|
||||||
process.exit();
|
process.exit();
|
||||||
});
|
});
|
||||||
|
res.resume();
|
||||||
});
|
});
|
||||||
req.end();
|
req.end();
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user