Closed lgreenspan closed 14 years ago
I think what's going on is that we're not properly handling the case where 0xff is the first byte of the packet. In this case, after looping over bufs, we end up calling buf.copy() with the intent of copying 'i' (0) bytes. Though this should be a no-op, Buffer.copy() bounds-checks the source before looking at the length being copied.
Fixed with 0.9.4.
BTW, thanks for the great test-case. Very helpful in tracking down and fixing this.
I get errors with websocket-client (as used in node-webworker) using node v0.1.100 on darwin. Using this test code http://gist.github.com/473964 and sending a request like
I often (but not always) get
Also connecting with d8 to the debug port, seems to more reliably cause this problem to appear. But this is only a correlation.