We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8f9b9c1 commit 49981b9Copy full SHA for 49981b9
test/parallel/test-http-remove-header-stays-removed.js
@@ -20,7 +20,7 @@
20
// USE OR OTHER DEALINGS IN THE SOFTWARE.
21
22
'use strict';
23
-require('../common');
+const common = require('../common');
24
const assert = require('assert');
25
26
const http = require('http');
@@ -56,6 +56,14 @@ server.listen(0, function() {
56
res.setEncoding('ascii');
57
res.on('data', function(chunk) {
58
response += chunk;
59
+ if (response === 'beep boop\n') {
60
+ setTimeout(function() {
61
+ // The socket should be closed immediately, with no keep-alive, because
62
+ // no content-length or transfer-encoding are used:
63
+ assert.strictEqual(res.socket.closed, true);
64
+ server.close();
65
+ }, common.platformTimeout(15));
66
+ }
67
});
68
69
0 commit comments