From 7fd9444728e1e509630f5ba0f50e7f9da150369c Mon Sep 17 00:00:00 2001 From: Valentin Bartenev Date: Tue, 6 Aug 2019 16:24:11 +0300 Subject: Node.js: returning "this" from writeHead() to allow chaining. In Node.js version 11.10.0 and later, the writeHead() function returns "this". --- test/node/double_end/app.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'test/node/double_end/app.js') diff --git a/test/node/double_end/app.js b/test/node/double_end/app.js index d8280917..63912097 100755 --- a/test/node/double_end/app.js +++ b/test/node/double_end/app.js @@ -1,6 +1,5 @@ #!/usr/bin/env node require('unit-http').createServer(function (req, res) { - res.end(); - res.end(); + res.end().end(); }).listen(7080); -- cgit