read entire buffer in web.js