Commits
Click on a commit to change the comparison rangefix: allow multipart/form-data boundary to end with a newline
The RFC 7578 spec for multipart/form-data requests does not require the
body of a request to end with a CRLF, only that each section begins with
a CRLF. While many clients implement multipart requests with the
trailing CRLF, the implementation for fetch in Node.js version 22 and
below does not.
This caused my a good number of hours debugging!
It does turn out that in September 2024 the Node.js fetch implementation
added the CRLF (https://github.com/nodejs/undici/pull/3625), though this
hasn't made it to a Node.js release yet.
This change allows the boundary to end with a newline or
not, as long as the boundary is followed by the end of the request body.10 months ago
by philnash