Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Additional WebSocket send tests to cover all payload size categories (#…
…2149) * Fixed bug in 16-bit frame length when buffer is a subarray I was just bitten by this issue. Because buffer could be a subarray, the `byteOffset` and `byteLength` arguments to `new DataView()` are required, otherwise the length value may be written at the wrong offset. Alternatively, it looks like it would be simpler (and it also works) to replace the patched line with `buffer.writeUInt16BE(bodyLength, 2)`. * Switched 16-bit length-writing fix to use Buffer.writeUInt16 instead of DataView.setUint16, and added a test for the fix * Added WebSocket send tests for the two previously-untested payload size categories
- Loading branch information