0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-10-30 09:08:00 -04:00
Original: f911eca8d1
This commit is contained in:
Ryan Dahl 2019-01-24 13:14:03 -05:00
parent 441bc0982b
commit 73d5d7c680
2 changed files with 4 additions and 8 deletions

View file

@ -246,10 +246,7 @@ export async function writeFrame(frame: WebSocketFrame, writer: Writer) {
let header: Uint8Array;
const hasMask = frame.mask ? 0x80 : 0;
if (payloadLength < 126) {
header = new Uint8Array([
0x80 | frame.opcode,
hasMask | payloadLength
]);
header = new Uint8Array([0x80 | frame.opcode, hasMask | payloadLength]);
} else if (payloadLength < 0xffff) {
header = new Uint8Array([
0x80 | frame.opcode,

View file

@ -64,7 +64,7 @@ export class Sha1 {
let code,
index = 0,
i,
start = this._start,
start = this._start,
length = message.length || 0,
blocks = this._blocks;
@ -369,8 +369,7 @@ export class Sha1 {
arrayBuffer() {
this.finalize();
return Uint32Array.of(
this._h0, this._h1, this._h2, this._h3, this._h4
).buffer;
return Uint32Array.of(this._h0, this._h1, this._h2, this._h3, this._h4)
.buffer;
}
}