Files
nginx-unit/test/node/write_array/app.js
Andrei Zeliankou e0c2675774 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.
2023-09-26 12:49:39 +01:00

5 lines
204 B
JavaScript

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);