diff --git a/source_commit b/source_commit index 75513ca0..8daf7c4b 100644 --- a/source_commit +++ b/source_commit @@ -1 +1 @@ -37e440211083389c5cbc6dad5c22ebace5ab1bc0 +4c29320e4ed7ed042cff9d5111ec7b1555c274aa diff --git a/uws.js b/uws.js index fac660b9..0eccec16 100644 --- a/uws.js +++ b/uws.js @@ -32,7 +32,7 @@ module.exports.DeclarativeResponse = class DeclarativeResponse { _appendInstruction(opcode, ...text) { this.instructions.push(opcode); text.forEach(str => { - const bytes = new TextEncoder().encode(str); + const bytes = (typeof data === 'string') ? new TextEncoder().encode(str) : str; this.instructions.push(bytes.length, ...bytes); }); }