You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GET /http/taco-demo/ 1371464955325
http.js:955
throw new TypeError('first argument must be a string or Buffer');
^
TypeError: first argument must be a string or Buffer
at ServerResponse.OutgoingMessage.end (http.js:955:13)
at respond (securify:1301:18)
at /home/anton/github/lib/node_modules/tacodb/node_modules/level/node_modules/levelup/lib/levelup.js:189:13
The text was updated successfully, but these errors were encountered:
dominictarr: aha, I found the problem
[1:11pm] dominictarr: it's to do with browserify bundles
[1:11pm] dominictarr: the problem is in securify
[1:12pm] dominictarr: the bfy stuff is bundling buffer-browserify
[1:12pm] dominictarr: when we want it to just leave that out and use the core version.
[1:14pm] no9: Ah so the error was in the right place so
[1:16pm] dominictarr: yeah, the problem was it was doing res.end(buffer)
[1:16pm] dominictarr: except node didn't agree that Buffer.isBuffer(buffer)
[1:19pm] dominictarr: how i found the bug: read the node.js http code, then added a monkey patch to log what was really being passed to res.end(….)
[1:24pm] dominictarr: if you want an urgent hack - fix level-static to always write strings
[1:24pm] dominictarr: or
[1:25pm] dominictarr: var end = http.OutgoingMessage.prototype.end; http.OutgoingMessage.prototype.end = function (data) { if (data) data = data.toString(); end.call(this, data) }
On linux ubuntu 13.10 and Mac OS 10.7.5
Checkout and install taco-demo
Browse to
http://localhost:8000/http/tacodemo/
Server crashes with
The text was updated successfully, but these errors were encountered: