Invalid response when large file piped to http response
lauriro opened this issue · comments
Lauri Rooden commented
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 02599f3
build: ./tools/build.py --jerry-profile=es2015-subset
Lauri Rooden commented
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