summaryrefslogtreecommitdiffhomepage
path: root/test/node/write_buffer
diff options
context:
space:
mode:
authorAndrei Zeliankou <zelenkov@nginx.com>2023-09-26 12:49:39 +0100
committerAndrei Zeliankou <zelenkov@nginx.com>2023-09-26 12:49:39 +0100
commite0c26757740fa7974af6e6592e35b5f2e00339fe (patch)
tree78651c9a5c94ced2a57c12f03ffa97ffe6e73ed4 /test/node/write_buffer
parent0f630c3f604e76de370529907b51ad29dfdc4ecb (diff)
downloadunit-e0c26757740fa7974af6e6592e35b5f2e00339fe.tar.gz
unit-e0c26757740fa7974af6e6592e35b5f2e00339fe.tar.bz2
Node.js: response body chunk can now be a Uint8Array.
Starting from Node.js 15.0.0 the chunk parameter of the response.write() can be a Uint8Array. This closes #870 issue on GitHub.
Diffstat (limited to 'test/node/write_buffer')
-rw-r--r--test/node/write_buffer/app.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/node/write_buffer/app.js b/test/node/write_buffer/app.js
index 506e8613..72e9c600 100644
--- a/test/node/write_buffer/app.js
+++ b/test/node/write_buffer/app.js
@@ -1,5 +1,5 @@
require('http').createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'})
- .end(new Buffer([0x62, 0x75, 0x66, 0x66, 0x65, 0x72]));
+ .end(Buffer.from('buffer', 'utf8'));
}).listen(7080);