Skip to content

append crlf to formdata body#3625

Merged
KhafraDev merged 2 commits intonodejs:mainfrom
KhafraDev:append-crlf-fd-body
Sep 20, 2024
Merged

append crlf to formdata body#3625
KhafraDev merged 2 commits intonodejs:mainfrom
KhafraDev:append-crlf-fd-body

Conversation

@KhafraDev
Copy link
Member

fixes #3624

this change is harmless. Servers that don't care should ignore it.

@KhafraDev KhafraDev merged commit fdeccc2 into nodejs:main Sep 20, 2024
@KhafraDev KhafraDev deleted the append-crlf-fd-body branch September 20, 2024 01:27
@github-actions github-actions bot mentioned this pull request Dec 3, 2024
This was referenced Dec 16, 2024
philnash added a commit to philnash/langflow that referenced this pull request Jan 14, 2025
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 (nodejs/undici#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.
philnash added a commit to philnash/langflow that referenced this pull request Jan 14, 2025
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 (nodejs/undici#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.
github-merge-queue bot pushed a commit to langflow-ai/langflow that referenced this pull request Jan 21, 2025
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 (nodejs/undici#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.
@github-actions github-actions bot mentioned this pull request Mar 12, 2025
github-actions bot pushed a commit that referenced this pull request May 12, 2025
* append crlf to formdata body * fixup! v18 (cherry picked from commit fdeccc2)
mcollina pushed a commit that referenced this pull request May 12, 2025
* append crlf to formdata body * fixup! v18 (cherry picked from commit fdeccc2) Co-authored-by: Khafra <maitken033380023@gmail.com>
@github-actions github-actions bot mentioned this pull request May 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

2 participants