Browse Source

test: fix hanging http obstext test

Set the Connection header to 'close' to work around a v0.10 quirk.
Prevents the test from timing out due to a still open TCP connection.
Test introduced in 1e45a61 ("deps: update http-parser to version 1.2").

PR-URL: https://github.com/nodejs/node/pull/5511
Reviewed-By: James M Snell <jasnell@gmail.com>
v0.10
Ben Noordhuis 9 years ago
parent
commit
e483f3fd26
  1. 4
      test/simple/test-http-header-obstext.js

4
test/simple/test-http-header-obstext.js

@ -8,9 +8,9 @@ var server = http.createServer(common.mustCall(function(req, res) {
server.listen(common.PORT, function() {
http.get({
port: common.PORT,
headers: {'Test': 'Düsseldorf'}
headers: {'Connection': 'close', 'Test': 'Düsseldorf'}
}, common.mustCall(function(res) {
assert.equal(res.statusCode, 200);
server.close();
}));
});
});

Loading…
Cancel
Save