mirror of https://github.com/lukechilds/node.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
445 B
19 lines
445 B
14 years ago
|
var common = require('../common');
|
||
|
var assert = require('assert');
|
||
|
var http = require('http');
|
||
|
|
||
|
var server = http.Server(function(req, res) {
|
||
|
res.writeHead(200, {'Content-Type': 'text/plain'});
|
||
13 years ago
|
res.end('hello world\n');
|
||
14 years ago
|
});
|
||
|
server.listen(common.PORT, function() {
|
||
|
var req = http.get({port: common.PORT}, function(res) {
|
||
|
res.on('end', function() {
|
||
|
assert.ok(!req.end());
|
||
|
server.close();
|
||
|
});
|
||
12 years ago
|
res.resume();
|
||
14 years ago
|
});
|
||
|
});
|
||
|
|