summaryrefslogtreecommitdiffhomepage
path: root/test/node/write_buffer/app.js
diff options
context:
space:
mode:
authorValentin Bartenev <vbart@nginx.com>2019-08-06 16:24:11 +0300
committerValentin Bartenev <vbart@nginx.com>2019-08-06 16:24:11 +0300
commit7fd9444728e1e509630f5ba0f50e7f9da150369c (patch)
tree2d6c898e0508f9df7e8367eaa64072fedd2c92ac /test/node/write_buffer/app.js
parentc7210eaa5a15083715cac574cce055b94860e70e (diff)
downloadunit-7fd9444728e1e509630f5ba0f50e7f9da150369c.tar.gz
unit-7fd9444728e1e509630f5ba0f50e7f9da150369c.tar.bz2
Node.js: returning "this" from writeHead() to allow chaining.
In Node.js version 11.10.0 and later, the writeHead() function returns "this".
Diffstat (limited to '')
-rwxr-xr-xtest/node/write_buffer/app.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/node/write_buffer/app.js b/test/node/write_buffer/app.js
index f41de2a1..a7623523 100755
--- a/test/node/write_buffer/app.js
+++ b/test/node/write_buffer/app.js
@@ -1,6 +1,6 @@
#!/usr/bin/env node
require('unit-http').createServer(function (req, res) {
- res.writeHead(200, {'Content-Type': 'text/plain'});
- res.end(new Buffer([0x62, 0x75, 0x66, 0x66, 0x65, 0x72]));
+ res.writeHead(200, {'Content-Type': 'text/plain'})
+ .end(new Buffer([0x62, 0x75, 0x66, 0x66, 0x65, 0x72]));
}).listen(7080);