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>
This commit is contained in:
Ben Noordhuis committed 2016-03-02 18:52:18 +01:00
1 parent 42ded2a590
commit e483f3fd26
1 file changed
+2 -2
+2 -2
View File
@@ -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();
}));
});
});