Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SharedArrayBuffer is not handled correctly in Response. #2465

Closed
tsctx opened this issue Nov 27, 2023 · 0 comments · Fixed by #2466
Closed

SharedArrayBuffer is not handled correctly in Response. #2465

tsctx opened this issue Nov 27, 2023 · 0 comments · Fixed by #2466
Labels
bug Something isn't working

Comments

@tsctx
Copy link
Member

tsctx commented Nov 27, 2023

Bug Description

SharedArrayBuffer is not handled correctly in Response.

Reproducible By

> $ node
Welcome to Node.js v21.1.0.
Type ".help" for more information.
> await (new Response(new SharedArrayBuffer(10))).text()
Uncaught TypeError: Received non-Uint8Array chunk
    at readAllBytes (node:internal/deps/undici/undici:1481:17)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async fullyReadBody (node:internal/deps/undici/undici:1432:24)
    at async specConsumeBody (node:internal/deps/undici/undici:4727:7)
    at async REPL1:1:33
>
  • chrome
await (new Response(new SharedArrayBuffer(10))).text(); // '[object SharedArrayBuffer]'

Expected Behavior

await (new Response(new SharedArrayBuffer(10))).text(); // '[object SharedArrayBuffer]'

Logs & Screenshots

200142

Environment

Additional context

@tsctx tsctx added the bug Something isn't working label Nov 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant