mirror of
https://github.com/denoland/deno.git
synced 2024-11-23 15:16:54 -05:00
fix(ws) mask must not be set by default for server (denoland/deno_std#616)
Original: de99fcbaf9
This commit is contained in:
parent
3cba0a4f4a
commit
04e4f10087
1 changed files with 4 additions and 3 deletions
|
@ -203,9 +203,9 @@ class WebSocketImpl implements WebSocket {
|
||||||
bufReader?: BufReader;
|
bufReader?: BufReader;
|
||||||
bufWriter?: BufWriter;
|
bufWriter?: BufWriter;
|
||||||
mask?: Uint8Array;
|
mask?: Uint8Array;
|
||||||
} = {}
|
}
|
||||||
) {
|
) {
|
||||||
this.mask = opts.mask || createMask();
|
this.mask = opts.mask;
|
||||||
this.bufReader = opts.bufReader || new BufReader(conn);
|
this.bufReader = opts.bufReader || new BufReader(conn);
|
||||||
this.bufWriter = opts.bufWriter || new BufWriter(conn);
|
this.bufWriter = opts.bufWriter || new BufWriter(conn);
|
||||||
}
|
}
|
||||||
|
@ -501,6 +501,7 @@ export async function connectWebSocket(
|
||||||
}
|
}
|
||||||
return new WebSocketImpl(conn, {
|
return new WebSocketImpl(conn, {
|
||||||
bufWriter,
|
bufWriter,
|
||||||
bufReader
|
bufReader,
|
||||||
|
mask: createMask()
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue