Separate values with a boundary
01A form body can carry several values. A boundary is a chosen marker that separates its parts; it is not a password or a label for the file type.
A candidate value containing a line beginning --Picnic conflicts with this boundary. The sender must choose another boundary before constructing this body; no valid transmission is drawn.
Key idea: The boundary parameter and delimiter lines must agree; a delimiter MUST NOT occur inside a part.
Rules & examples
The boundary parameter and delimiter lines must agree; a delimiter MUST NOT occur inside a part.
- The media type is multipart/form-data and its boundary parameter is required. The format is transport-independent; the browser and receiving web application here are one example, not the only possible users.
- Each part has headers, an empty line, then its data. Delimiter lines use two leading hyphens and the boundary value. CRLF means the two bytes carriage return and line feed.
- The delimiter after the final part has two extra trailing hyphens. A delimiter between parts does not close the body. RFC 2046 section 5.1.1 supplies this MIME framing; verified erratum 4676 corrects the misplaced hyphens in RFC 7578 section 4.6.
- The delimiter MUST NOT appear inside an encapsulated part. Choose a different boundary if it would collide. Boundary values can need quoting. Construct each delimiter by adding two hyphens to the actual parameter value, even if that value itself starts with hyphens.
- The worked boundary Picnic is a short fictional fixture. MIME boundary values are limited to 70 characters excluding the two delimiter hyphens. No HTTP method, request length or transport security is specified by this body format.
The drawing labels empty lines and CRLF for explanation; those labels are not transmitted text. The bounded teaching encoder accepts a conservative ASCII boundary/header subset, emits exact bytes, and rejects delimiter-prefix collisions. It is not a streaming MIME parser or a browser form implementation.
Sources
New to this? Start hereA quick picture + helpful background
A message needs an address.
Think of a packet as a small addressed envelope. Devices pass it onward; transport protocols decide what delivery promises an application gets.
Helpful first, if these ideas are unfamiliar
These pictures are analogies to help you learn. The linked RFC explains the actual rules.
Related RFCs and changes
“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.