Visual RFC.
ALL RFCs / RFC 7578
Read the RFC ↗
RFC 7578 / MULTIPART FORM DATA

Keep encoding and upload safety separate

05

Multipart framing can carry binary data directly on HTTP. Filename encoding and part headers describe data; they do not encrypt it, authenticate it or make a file safe to execute.

RFC 7578 · § 4.7EXAMPLE
4 / 4
04
Hold untrusted contents for application checks.

Successful framing only recovers the supplied fields and bytes. It does not establish that the sender or file is safe. This example application holds the file rather than executing it automatically.

Keep encoding and upload safety separateSuccessful framing only recovers the supplied fields and bytes. It does not establish that the sender or file is safe. This example application holds the file rather than executing it automatically.Framing does not make a file safeReceived partUntrusted filerecovered bytesApplication policy: hold for checksNo automatic execution or overwriteFraming supplies no confidentiality or integrity

Key idea: For binary-capable contexts such as HTTP, senders SHOULD NOT generate Content-Transfer-Encoding part headers.

Terms

Look up a term in the glossary ↗

Rules & examples
  • A binary-capable transport can carry the fixture bytes 00 7F 80 FF directly in a part body. Do not add MIME Base64 merely because this is multipart. Restricted transports have different considerations; section 4.7 deprecates transfer encoding for binary-capable contexts.
  • Filename characters MAY be encoded using the UTF-8 percent-encoding option (section 2). For example, café.txt can be represented as caf%C3%A9.txt. This describes a filename parameter, not percent-encoding of the entire binary file body, and does not promise every receiver will decode it the same way.
  • The filename* parameter specified by RFC 5987 MUST NOT be used in multipart/form-data. Do not copy the rules for an HTTP response’s Content-Disposition field into this different context.
  • Other part header fields beyond the permitted Content-Disposition, Content-Type and limited Content-Transfer-Encoding cases MUST NOT be included and MUST be ignored. Do not invent a part Content-Length requirement.
  • RFC 7578 supplies no integrity checking, confidentiality or general security protection. File bodies may be executable; filenames can cause overwrites if used blindly. Applications need their own authorization, storage, content and transport protections. The final hold-for-checks gate is an illustrative application policy.

No network request, file read, filesystem write, live upload or account operation is performed by these scenes. The bytes, filenames and values are fictional QA fixtures. The body encoder is bounded format teaching code, not a production upload service or security validator.

Sources
Protocol participantThreat or exceptionProtocol controlSimplified drawings · precise section references
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.

All chapters in RFC 7578

Drawing view

Scroll the drawing to see every part. Playback controls stay above it.

RFC 9700 / CHAPTERS

Chapters

For full details, tables, algorithms, and exceptions, read the original RFC.

RFC status and corrections ↗