Skip to content

Use CRLF line endings in multipart byterange boundaries#3143

Merged
Kludex merged 3 commits intomainfrom
fix/multipart-crlf
Feb 14, 2026
Merged

Use CRLF line endings in multipart byterange boundaries#3143
Kludex merged 3 commits intomainfrom
fix/multipart-crlf

Conversation

@Kludex
Copy link
Owner

@Kludex Kludex commented Feb 14, 2026

Per RFC 2046 §5.1.1, MIME multipart boundaries require CRLF (\r\n) as line separators, not bare LF (\n).

The boundary delimiter line is then defined as a line consisting entirely of two hyphen characters ("-", decimal value 45) followed by the boundary parameter value from the Content-Type header field, optional linear whitespace, and a terminating CRLF.

The CRLF preceding the boundary delimiter line is conceptually attached to the boundary so that it is possible to have a part that does not end with a CRLF (line break).

Credit to @viccie30.

Per RFC 2046 §5.1.1, MIME multipart boundaries require CRLF (\r\n)
as line separators, not bare LF (\n).
@Kludex Kludex assigned Kludex and unassigned Kludex Feb 14, 2026
@Kludex Kludex enabled auto-merge (squash) February 14, 2026 13:11
@Kludex Kludex merged commit 9c74ef4 into main Feb 14, 2026
6 checks passed
@Kludex Kludex deleted the fix/multipart-crlf branch February 14, 2026 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants