Skip to content

Commit

Permalink
fix: properly handle WebSocket msgs sent with opcode 2 (binary) (#152)
Browse files Browse the repository at this point in the history
  • Loading branch information
rentallect authored Jul 2, 2024
1 parent 37c7af0 commit 132a916
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/http/receiver.js
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,7 @@ class Receiver extends Writable {

if (this._binaryType === 'nodebuffer') {
data = BUFFERUTIL.concat(fragments, messageLength);
data = data.buffer.slice(data.byteOffset, data.byteLength + data.byteOffset)
} else if (this._binaryType === 'arraybuffer') {
data = BUFFERUTIL.toArrayBuffer(BUFFERUTIL.concat(fragments, messageLength));
} else {
Expand Down

0 comments on commit 132a916

Please sign in to comment.