Skip to content

fix: res.send() preserve data for non-Uint8Array typed arrays - #7584

Closed
hasan19524 wants to merge 4 commits into
expressjs:masterfrom
hasan19524:fix/res-send-typed-array
Closed

hasan19524 wants to merge 4 commits into
expressjs:masterfrom
hasan19524:fix/res-send-typed-array

Conversation

@hasan19524

Copy link
Copy Markdown

Typed array views other than Uint8Array (e.g. Float32Array) were converted via Buffer.from(chunk, encoding), treating the view as a string and corrupting data or throwing. Convert from the underlying ArrayBuffer with byteOffset/byteLength instead.

@krzysdz

krzysdz commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Duplicate of #7542

@krzysdz krzysdz marked this as a duplicate of #7542 Nov 2, 2026
@krzysdz krzysdz closed this Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants