mirror of
https://github.com/bitinflow/server.git
synced 2026-03-13 13:35:53 +00:00
add error handlers to requests and sockets
Trying to flush out cause of sporadic socket failures and identify which socket is not being handled.
This commit is contained in:
@@ -28,16 +28,8 @@ test('landing page', function(done) {
|
||||
|
||||
var req = http.request(opt, function(res) {
|
||||
res.setEncoding('utf8');
|
||||
var body = '';
|
||||
|
||||
res.on('data', function(chunk) {
|
||||
body += chunk;
|
||||
});
|
||||
|
||||
res.on('end', function() {
|
||||
assert(body.indexOf('Redirecting to https://localtunnel.github.io/www/') > 0);
|
||||
done();
|
||||
});
|
||||
assert.equal(res.headers.location, 'https://localtunnel.github.io/www/')
|
||||
done();
|
||||
});
|
||||
|
||||
req.end();
|
||||
|
||||
Reference in New Issue
Block a user