Skip to content

Commit

Permalink
properly handle WebSocket msgs sent with opcode 2 (binary)
Browse files Browse the repository at this point in the history
  • Loading branch information
rentallect committed Jul 2, 2024
1 parent 37c7af0 commit 92d1c26
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 92d1c26

Please sign in to comment.