Summary

  • RFC 6266, June 2011, took over the definition of Content-Disposition for HTTP — a field the web had already been using for more than a decade without owning it.
  • Its starting point is a remarkable admission. RFC 2616 said the field "is not part of the HTTP standard", and that because it was "widely implemented, we are documenting its use and risks".
  • The 2011 document invented nothing. It profiled the MIME variant after interoperability testing, and settled how a non-ASCII filename gets spelled.

A header nobody invited

Every browser needed a name for the file it was about to save. Every server wanted to suggest one. So a field that mail had defined for attachments in RFC 2183 was borrowed, bolted onto HTTP responses, and used everywhere — while the HTTP specification kept a polite distance from it.

RFC 2616, published in June 1999, devoted a subsection to explaining that the thing was not really its business: Content-Disposition "is not part of the HTTP standard, but since it is widely implemented, we are documenting its use and risks for implementors." It is the most honest sentence in the family, and the least useful to anyone who wanted rules.

Twelve years of local custom

Without a specification, every browser made its own calls: how to parse the parameters, which encoding to assume for a name with an accent in it, and what to do when a server sent two values that disagreed.

The result was not chaos. It was something worse for a newcomer — a set of regional customs, each of which had to be reverse-engineered separately, roughly in the order the market share arrived.

What June 2011 actually did

RFC 6266 did not invent the field. It ran interoperability tests, then wrote down the shape everyone had already converged on: how the parameters combine, which one wins, and how the extended filename* form carries non-ASCII names using RFC 5987 encoding.

The appendices on percent-encoding and encoding sniffing read like field notes from compatibility work, because that is exactly what they are.

The filename is an interface with a human being

A download's suggested name is one of the very few strings a server sends that a person actually reads — usually with a decision attached: keep, rename, open, or stop and think.

That makes it a security surface. Names arrive carrying path separators, control characters, trailing dots, bidirectional overrides, and Unicode that renders as something else entirely. The safe transformation belongs in the browser, not in the server's good intentions.

Why a document that cannot enforce anything still matters

A browser can now point at a paragraph when it trims a path component or replaces a character. A server can predict what the second implementation will do. Predictability is the entire product of a compatibility specification, and it is worth more than elegance.

The lesson: documentation is leverage over behaviour nobody specified

Standardising what everyone already does is not a lesser activity. It is the only mechanism that turns a custom into a rule.

When a widely deployed accident exists, the useful move is to write down the accident, its variations and its risks — because documentation is the only leverage anyone has over behaviour that no one ever specified. It is the same hierarchy Lu Heng calls running-code primacy: where the paper and the deployed reality diverge, the deployed reality is what the network is actually running.