From e0c26757740fa7974af6e6592e35b5f2e00339fe Mon Sep 17 00:00:00 2001 From: Andrei Zeliankou Date: Tue, 26 Sep 2023 12:49:39 +0100 Subject: 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. --- test/node/write_array/app.js | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 test/node/write_array/app.js (limited to 'test/node/write_array') diff --git a/test/node/write_array/app.js b/test/node/write_array/app.js new file mode 100644 index 00000000..b7abb3fc --- /dev/null +++ b/test/node/write_array/app.js @@ -0,0 +1,4 @@ +require('http').createServer(function (req, res) { + res.writeHead(200, {'Content-Length': 5, 'Content-Type': 'text/plain'}) + .end(new Uint8Array(Buffer.from('array', 'utf8'))); +}).listen(7080); -- cgit