Re: [whatwg/fetch] Define multipart/form-data (PR #1922)

@youennf commented on this pull request.



> +   <li><p>If <var>position</var> does not point to a sequence of bytes starting with 0x2D 0x2D
+   (`<code>--</code>`) followed by <var>boundary</var>, then return failure.
+
+   <li><p>Advance <var>position</var> by 2 + the length of <var>boundary</var>.
+
+   <li><p>Collect a sequence of bytes that are <a>HTTP tab or space bytes</a> given
+   <var>position</var>. (Do nothing with those bytes.)
+
+   <li>
+    <p>If <var>position</var> points to a sequence of bytes starting with 0x2D 0x2D
+    (`<code>--</code>`):
+
+    <ol>
+     <li><p>If <var>position</var> + 2 points to the end of <var>input</var>, or
+     <var>position</var> + 2 points to a sequence of bytes starting with 0x0D 0x0A (CR LF), then
+     return <var>entryList</var>.

According RFC, there could be some spaces between `--` and CRLF, not sure what UAs are doing though.
Also, I am not sure what happens with UAs if there are non whitespace characters after `--`. Maybe entryList is returned instead of a failure.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/pull/1922#pullrequestreview-4205716642
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/fetch/pull/1922/review/4205716642@github.com>

Received on Thursday, 30 April 2026 13:55:43 UTC