Lauri Rooden
Lauri Rooden
server.js ```javascript var fs = require("fs") require("http").createServer(function(request, response) { fs.createReadStream("10mb.file").pipe(response) }) .listen(8080) ``` ``` # reading file fast results correct hash $ curl -s http://localhost:8000/ | sha1sum 39c380826c78c5631ad3a922b22e1363596e5dd7 - $...
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...
Implement #5815
``` javascript function ns(str, root) { return str.split(".").reduce(function(p, n){return p[n]=p[n]||{}}, root||this) } !function(self){ self.x = 1 }(ns("myApp.util")) !function(self){ // dependencies var util = ns("myApp.util") self.x = util.x + 1 }(ns("myApp.other"))...
``` console.log(Buffer.from("")) ``` ``` TypeError: length argument is undefined # 0: buffer.js:38 # 1: buffer.js:302 # 2: buffer.js:177 ``` Linux, commit: 5ec2ecbf