Open lauriro opened 2 years ago
When file larger than a kernel page is piped to http response, first page is missing and second page is sent twice, resulting a corrupt file.
minimal example: https://github.com/lauriro/iotjs-buffer-error-example commit 02599f35810cfa6ea5495bbc42194ed576b969de build: ./tools/build.py --jerry-profile=es2015-subset
I created a fs.js in example repo.
$ iotjs fs.js 4kb.txt Same true ... $ node fs.js 4kb.txt Same false
Iotjs reuses buffer and refill it before it is written to underlying system stream
When file larger than a kernel page is piped to http response, first page is missing and second page is sent twice, resulting a corrupt file.
minimal example: https://github.com/lauriro/iotjs-buffer-error-example commit 02599f35810cfa6ea5495bbc42194ed576b969de build: ./tools/build.py --jerry-profile=es2015-subset