-
-
Notifications
You must be signed in to change notification settings - Fork 688
Closed
Labels
bugSomething isn't workingSomething isn't workingfetchgood first issueGood for newcomersGood for newcomers
Description
Version
v18.6.0
Platform
Darwin C02G87AYMD6R 21.5.0 Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:22 PDT 2022; root:xnu-8020.121.3~4/RELEASE_X86_64 x86_64
Subsystem
macos
What steps will reproduce the bug?
node test.js
async function test(n) {
const s = "a".repeat(n);
const base64 = Buffer.from(s).toString("base64");
const dataURIPrefix = "data:application/octet-stream;base64,";
const url = dataURIPrefix + base64;
const resp = await fetch(url);
const buf = await resp.arrayBuffer();
const str = Buffer.from(buf).toString("ascii");
console.log(str === s);
}
test(1 << 10); // true
test(1 << 20); // nothing happens
test(1 << 15); // true
How often does it reproduce? Is there a required condition?
always reproduce
What is the expected behavior?
expect log true always or throw error
What do you see instead?
when url is long enough, fetch is crash and nothing happen
Additional information
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingfetchgood first issueGood for newcomersGood for newcomers