The paperclip promised more than the sender could deliver

Picture a mailbox in the summer of 1995. A message arrives with a small icon and a name attached to it: Q3-forecast.xls. The sender picked that name. The sender picked the icon. What the sender could not pick — could not touch, could not even see — was what happened next: which directory the bytes landed in, whether an older file of the same name was quietly erased, whether the extension would later summon a spreadsheet or a shell.

That asymmetry is the entire architecture of RFC 1806, published in June 1995 as an Experimental specification. It gave one side of a network conversation a way to state intent, and it refused to let that statement become authority. The sender named the file. The receiver still owned the disk.

Three decades on, that division of labour is the reason the header outlived the mail clients that inspired it, migrated into HTTP downloads, and now runs backwards through every web upload form on the planet. Content-Disposition is not a success story about metadata. It is a success story about knowing exactly how much a remote party is allowed to decide.

MIME could ship a part before it could say what to do with it

Internet mail became a container before it became a presentation agreement. RFC 1521 let a single message carry typed text, images, applications and nested multipart structures. Its successors, RFC 2045 and RFC 2046, tightened the grammar and expanded the media type registry. A receiver could now discover what a part claimed to be and precisely where its encoded bytes ended.

It still had no idea what the human should see. One mail program expanded every image in the reading pane. Another printed a list of filenames. A character terminal could not impersonate a graphical workstation even if it wanted to. The message supplied material; presentation remained the property of the receiving user agent.

Two engineers walked into that gap. Rob Troost and Steve Dorner — Dorner being the man behind the Eudora mail client, which is to say a man who had personally watched users confront strange attachments — wrote the header that filled it. Their answer was deliberately modest: an optional Content-Disposition field, applicable to any MIME entity, carrying the sender's desired presentation semantics. If the field was missing, the mail user agent kept whatever method it considered suitable.

That absence rule is the tell. The header did not create the receiver's authority; it handed the receiver one more opinion to weigh. The receiving program still held the screen, the local policy, the filesystem and the relationship with the person sitting in front of it. A field arriving inside a message could influence those controls. It could not own them.

Two words, one treaty: inline and attachment

The founding vocabulary was small enough to fit on a napkin. inline meant the part should be shown automatically in the ordinary flow, subject to whatever the surrounding multipart had already decreed. attachment meant it should not — some further action from the user should come first. A graphical client might draw an icon; a text terminal might print a selectable list; a cautious client might do both and ask.

This was a genuinely elegant split of decision rights. The sender knew whether a part belonged to the document at hand or was a separate object. The receiver knew what it could safely render and how its interface worked. The user decided whether to walk through the attachment gate.

But a disposition value was never an observation. inline did not prove the client supported the media type, passed its safety checks, rendered the bytes, or put them in front of a human being. attachment did not prove anyone opened or saved anything. A perfectly compliant receiver could suppress an inline part or quarantine an attachment for reasons the sender never imagined.

Nested multipart made the limit vivid. A disposition on a multipart entity governed the container as a whole. If the container was an attachment, its contents waited for user action; only after the container opened did the dispositions of the inner parts become relevant. One message could therefore stack several gates in a row, and no outer label proved that an inner part had ever been reached.

Unknown values were handled with the conservatism of people who had been burned before. RFC 1806 directed an unrecognised disposition type to be treated as an attachment, on the theory that a sender reaching for an elaborate new token probably intended more than ordinary inline display. Unrecognised parameters could be ignored. The fallback bounded automatic exposure without inventing meaning for a word the receiver did not understand.

The filename was a suggestion wearing a suit

The optional filename parameter supplied what RFC 1806 called a default archival disposition: if the recipient chose to detach a body part, here is what the resulting file might be called.

The word "suggest" carried the entire security model, and it has aged beautifully. A filename that is harmless on one system is a path, a device, a startup instruction or an executable trigger on another. The receiver — not the sender — knows which names already exist, which directories are writable, which separators mean anything, and which applications will leap into action when they see an extension.

So the specification said directory information should not be respected. A value shaped like a path was to be reduced to its terminal component. The receiving program had to avoid clobbering an existing file and adapt the name to local conventions. And a filename could ride along on an inline entity without causing a single byte to be written; it merely stood ready in case the user later chose to save.

The security section did not hide behind polite generalities. It named the hazards outright: creating a startup file, overwriting a system file, replacing an existing file, dropping an executable into a command-search path, or piping content somewhere it would be interpreted. The governing rule was that a receiving program should never name or place content so that interpretation or execution happened without explicit user initiation.

Read that as an evidence chain, because it is one. A sender emitted a string. A parser recovered it. A policy stripped path meaning and checked for collisions. A filesystem operation created bytes under an actual local name. A later application may or may not have opened them. The header proves the first claim and, with a capture, the second. It is not a receipt for anything that follows.

RFC 2183: the experiment graduates, and the dates start lying

The RFC Series record for RFC 1806 shows the experiment was replaced in August 1997 by RFC 2183, a Proposed Standard, with Kevin Moore joining Troost and Dorner. The revised text kept inline, attachment and receiver-owned filename checking, then added creation, modification and read dates plus an approximate size.

The additions made a MIME entity look more like a transferable file record. They did not authenticate its history. RFC 2183 went out of its way to warn Unix and POSIX implementors that st_ctime is not creation time — a small sentence that has saved an unknown number of engineers from a very confident wrong answer. A date was a sender-carried assertion; the receiver chose whether to keep it. Approximate size could help preallocate storage or judge whether space looked sufficient. It was not a digest, not a completed-write receipt, and not a promise that the allocation would succeed.

The revision also formalised extension registration through IANA. The current Content Disposition registry holds the original values alongside later protocol-specific ones. Registration gives a token a public definition and a change procedure. It does not prove that any given client implements it, or that the value makes sense in every protocol sharing the registry.

RFC 2231: names in every language, same old distrust

RFC 1806 admitted that its parameter grammar confined filenames to US-ASCII. That was more than cosmetic. The suggested local name was meant for a person, and most people on Earth could not write an ordinary filename in their own script.

RFC 2231 fixed it with characteristic caution: numbered segments so a long value could be continued in order, and a trailing asterisk on a parameter name to signal an extended value whose prefix named a character set and optional language, followed by percent-encoded octets.

Fidelity improved; the number of states worth recording multiplied. Raw segments can arrive reordered or with gaps. Encoded and unencoded segments can be mixed in one value. A charset can be unknown or invalid. A language tag can help display without changing the identity of the bytes. The final Unicode string is a decoding result, not the raw field.

And a beautifully decoded path traversal is still a path traversal. A correctly reconstructed reserved device name is still dangerous. Encoding solves representation. It does not grant permission.

The Web borrowed the field, then standardised it a decade late

By 1999, RFC 2616 could note that the RFC 1806-derived field was widely implemented in HTTP even though Content-Disposition was not part of the HTTP standard. The Web had discovered the same need as mail: an origin server wanting to say "save this separately" and to offer a useful name for the privilege.

RFC 6266 made an honest woman of it in 2011. attachment asks the user agent to prompt for local saving rather than process the representation normally; inline describes ordinary processing and may still carry a name for a later save.

The HTTP profile sharpened the recipient's obligations into something close to a checklist for paranoid engineers. Filenames were "advisory only." A user agent must stop a server from selecting an unauthorised location, strip everything but the last path segment, distrust any extension that could cause dangerous later handling, remove confusing control characters and whitespace, and neutralise names with special filesystem or shell meaning.

For names beyond the legacy range, a server can send a plain filename fallback alongside a filename* extended value; a recipient supporting both should prefer the latter. RFC 8187 later refined HTTP's charset-and-language parameter encoding and required UTF-8 support. The precedence decision needs its own record: raw values, selected parameter, decoder, resulting displayed name.

Uploads run the same header backwards

Content-Disposition also lives inside multipart form bodies, but that is a different contract wearing the same name. RFC 6266 expressly excludes body-part fields such as multipart/form-data from its HTTP response-header profile.

RFC 7578 requires every form-data part to carry Content-Disposition: form-data plus a name parameter, and a file part should include a filename when a meaningful one exists. On this path the browser or upload client is the sender, and the receiving web application inherits the job of defending its filesystem.

RFC 7578 repeats the old rule: do not use the supplied name blindly, adapt it to local conventions, discard directory information. It also forbids the filename* convention in this body-part context even though HTTP responses happily use it. The shared field name does not erase context. A parser applying the right grammar in the wrong protocol position produces a plausible and entirely incorrect result.

Which is why the history is not simply "email attachments became browser downloads." It is the migration of a narrow authority contract. Across mail, HTTP responses and form uploads, a remote party describes desired handling and proposes a human-facing name. The local party still owns the final action.

Why it lasted: intent travels, authority does not

Trace the roles and they never blur. The sender controls desired presentation and suggested metadata. The intermediary controls preservation or rewriting. The recipient parser controls syntactic recovery. The user agent or server application controls policy. The operating system controls pathname and execution semantics. The user controls later action — but only when the interface makes that choice real rather than decorative.

The decision rule fits in one line: remote intent may inform local action, but it cannot authorise it. Bind every write to an entitled directory, generate or approve the final local name, validate type and extension together, prevent silent overwrite, and require an explicit act before interpretation or execution. Registration and correct encoding improve communication; neither substitutes for those controls.

The second-order risk is namespace capture — a remote sender who can choose paths or overwrite behaviour can reorganise local state without ever owning it. The third-order risk is semantic laundering, where a persuasive filename or extension persuades a user or a platform to interpret bytes under a different program and a different risk model than the declared media type.

The irreversible point is not parsing. It is overwrite, execution or disclosure. Once a file is replaced, code runs, an upload enters a trusted workflow or inline content leaks information, no later correction to the header restores the prior state. Keep the raw claim, the parsed meaning, the policy decision, the local effect and the human outcome as separate receipts.

In 1995 two engineers could have grabbed the whole machine and called it convenience. Instead they wrote a header that knew its place. The sender named the file. The receiver still owned the disk.

Sources