You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When sending a multipart/form-data with a filename*=utf-8'' (as the MultipartFormDataContent class in C# does for example, or in this example in the RFC: https://datatracker.ietf.org/doc/html/rfc6266#section-5) content disposition it throws a "Failed to parse body as FormData." TypeError.
The existance of a filename*=utf-8 field shouldn't lead to parse failure, it should be used as the filename.
Logs & Screenshots
node:internal/deps/undici/undici:5619
throw new TypeError("Failed to parse body as FormData.");
^
TypeError: Failed to parse body as FormData.
at node:internal/deps/undici/undici:5619:27
at successSteps (node:internal/deps/undici/undici:5663:27)
at fullyReadBody (node:internal/deps/undici/undici:4561:9)
at async consumeBody (node:internal/deps/undici/undici:5672:7)
at async file:///index.js:15:1
Environment
This bug is NOT present in node v20.12.2, but IS present from node v20.13 and onward.
Additional context
Workaround: downgrade to node v20.12.2
The text was updated successfully, but these errors were encountered:
I will take a look in a few days. We switched formdata parsers, probably ended up between those two versions of node, and I guess I forgot to implement filename* parsing support.
Bug Description
When sending a multipart/form-data with a
filename*=utf-8''
(as the MultipartFormDataContent class in C# does for example, or in this example in the RFC: https://datatracker.ietf.org/doc/html/rfc6266#section-5) content disposition it throws a "Failed to parse body as FormData." TypeError.Reproducible By
Expected Behavior
The existance of a
filename*=utf-8
field shouldn't lead to parse failure, it should be used as the filename.Logs & Screenshots
Environment
This bug is NOT present in node v20.12.2, but IS present from node v20.13 and onward.
Additional context
Workaround: downgrade to node v20.12.2
The text was updated successfully, but these errors were encountered: