Skip to content
Myr

fix(websocket): prevent sending entire buffer when streaming Uint8Array chunks (#3570)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

* fix(websocket): prevent full buffer send on Uint8Array chunks * Fix formatting and line endings for CI compliance

authored by Ariel-Moroshko · committed by GitHub · parent a90db7c · Browse files · 2 files+3 added−6 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+3 added−6 removed

  • tests:+2 added−2 removed
  • other:+1 added−4 removed

2 files+3 added−6 removed

modified:src/helper/websocket/index.test.ts+2 added-2 removed
modified:src/helper/websocket/index.ts+1 added-4 removed
66 unmodified lines
67 this.url = init.url ? new URL(init.url) : null68 this.protocol = init.protocol ?? null69 }70 send(source: string | ArrayBuffer | Uint8Array, options?: SendOptions): void {71 this.#init.send(72 typeof source === 'string' ? source : source instanceof Uint8Array ? source.buffer : source,73 options ?? {}74 )71 this.#init.send(source, options ?? {})72 }73 raw?: T74 binaryType: BinaryType = 'arraybuffer'75 get readyState(): WSReadyState {
41 unmodified lines