-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
Cloning a Request with a FormData body hangs the process #52167
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
Comments
This is also very likely an issue with Undici since that's what implements |
This is fixed in undici v6.7.0. The fix for this will likely come to Node.js v21 very soon. Then we need to think what we want to do for Node.js v18 and v20 (which ships undici v5). cc @nodejs/undici |
@mcollina, incredible! Is the backport viable for the fix? |
I actually have no idea what fixed it, and if we should backport to v5 or just update v18 and v20 to latest undici. |
If possible, updating Undici to the latest sounds like a good strategy 👍 |
@nodejs/releasers any objections to update to Undici v6 in the next v20 release? |
No objections, on the basis that the change is not breaking for users of Node.js, but it may have to be done in a backport pull request as I'm not sure the commits will land cleanly as there were separate updates on Node.js 20 for Undici 5.x. |
@marco-ippolito the updates are already in #52793. Closing as this will come out in the next few days. |
Uh oh!
There was an error while loading. Please reload this page.
Version
v18.19.0, v20.11.0, v21.7.0
Platform
Darwin Artems-Air.home 23.2.0 Darwin Kernel Version 23.2.0: Wed Nov 15 21:59:33 PST 2023; root:xnu-10002.61.3~2/RELEASE_ARM64_T8112 arm64
Subsystem
No response
What steps will reproduce the bug?
How often does it reproduce? Is there a required condition?
This reproduces reliably 100% of the time.
What is the expected behavior? Why is that the expected behavior?
The process exits with 0. If you replace the request body with any other supported value, the process does exit.
What do you see instead?
The process hangs forever, failing to execute
request.clone()
when aRequest
instance hasFormData
as its body. Seems to be sensitive toFormData
with values. Removing thedata.set(...)
call makes the issue go away (nothing to copy while cloning the request, I presume).Additional information
Originally reported in MSW: mswjs/msw#2078
The text was updated successfully, but these errors were encountered: