Browse Source

test: update http tests for ECONNRESET change

v0.9.10-release
isaacs 12 years ago
parent
commit
862b164209
  1. 1
      test/simple/test-http-conn-reset.js
  2. 5
      test/simple/test-http-multi-line-headers.js
  3. 4
      test/simple/test-http-response-no-headers.js

1
test/simple/test-http-conn-reset.js

@ -45,7 +45,6 @@ function onListen() {
});
req.on('error', function(err) {
assert.equal(err.code, 'ECONNRESET');
assert.equal(err.message, 'socket hang up');
caughtError = true;
});
req.end();

5
test/simple/test-http-multi-line-headers.js

@ -40,10 +40,8 @@ var server = net.createServer(function(conn) {
'\r\n' +
body;
conn.write(response, function() {
conn.destroy();
conn.end(response);
server.close();
});
});
server.listen(common.PORT, function() {
@ -51,6 +49,7 @@ server.listen(common.PORT, function() {
assert.equal(res.headers['content-type'],
'text/plain;x-unix-mode=0600;name="hello.txt"');
gotResponse = true;
res.destroy();
});
});

4
test/simple/test-http-response-no-headers.js

@ -41,9 +41,7 @@ function test(httpVersion, callback) {
var reply = 'HTTP/' + httpVersion + ' 200 OK\r\n\r\n' +
expected[httpVersion];
conn.write(reply, function() {
conn.destroy();
});
conn.end(reply);
});
server.listen(common.PORT, '127.0.0.1', function() {

Loading…
Cancel
Save