The filename that arrives in pieces
Somewhere between a sender's keyboard and your Downloads folder, a filename can arrive in fragments: numbered from zero, possibly out of order, and split cleanly through the middle of a character. That a file called Quarterly review final.pdf survives the journey at all is a quiet monument to Ned Freed, the engineer who insisted that reassembly be exact and that trust be a separate step entirely.
Freed, who died in 2022, spent a career making Internet mail sturdier than it had any right to be. His rule for long, internationalised filenames — RFC 2231 — is a small masterpiece of the same instinct: give the wire a strict grammar, then refuse to let a well-formed string masquerade as permission. A receiver must rebuild the pieces in order before it decodes them. Even then, what it recovers is content-disposition metadata: a suggestion, not a safe pathname, an identity, or a licence to act.
A filename in three pieces
Picture an attachment arriving with this illustrative metadata:
filename*0*=utf-8'en'Quarterly%20; filename*1*=review%20; filename*2=final.pdf
No single field contains the visible name. The first section declares UTF-8 and an optional language, then carries the opening octets. The second continues with percent-encoded material. The third is plain. Join them correctly and the logical result is Quarterly review final.pdf.
The easy mistake is to read those fields as three independent strings. RFC 2231 is more exacting. The suffixes start at zero, climb by one, and admit no gaps; leading zeroes are banned. MIME parameter order is otherwise meaningless, so a receiver cannot lean on arrival order — *2 may show up before *0. It has to spot the shared base name, confirm a single unambiguous consecutive series, and concatenate by number.
Only then is there one encoded value to interpret. The charset and language, when present, sit at the head of the first encoded section; they are not fresh declarations for each fragment. That makes the seam between two sections a transport convenience, not necessarily a character boundary. A multibyte character can straddle it. Decode each fragment as if it were whole text and you may manufacture replacement characters — or a different string than the parser that reassembles first.
RFC 2231 never bills itself as a modern security model, and its security paragraph is thin. But its grammar implies a durable order of work: parse the names, validate the series, order and join the payload, percent-decode to octets, interpret the declared charset, then hand the value to a separate disposition policy. Each verb answers a different question. Blur them and you hide the disagreements that malformed mail and attackers love.
Syntax proves reconstruction, not permission
RFC 2231 extended MIME parameter syntax. It did not turn a parameter into an operating-system command. That line was already drawn in RFC 2183, the Content-Disposition specification that RFC 2231 updated.
RFC 2183 calls filename a suggested name for storing a detached body part. A receiving mail agent may use it — but never blindly. Directory information should be dropped, leaving at most the final path component. The receiver must weigh whether the proposed name overwrites an existing file, points at a special or system location, drops an executable into a search path, or invokes a pipe. Nothing should be named or placed so that it runs without a separate, deliberate act by the user.
Those warnings still bite after a flawless reassembly. A valid UTF-8 value can still smuggle ../, an absolute path, control characters, a misleading extension, a reserved device name, or glyphs that render deceptively. Percent decoding sanitises none of it. Charset decoding proves nothing about who sent the message. A parameter called filename does not authenticate the declared media type, and neither field authorises a launcher to run the bytes.
So the control boundary is layered. The MIME parser decides whether the continuation is structurally coherent. The decoder decides which text the octets represent. A filename policy picks or builds a safe local name. The storage layer chooses a confined destination with no accidental overwrite. The user — or a separately authorised policy — decides whether content may be opened or executed. Clearing one gate never substitutes for the next.
The authorship line is also a protocol boundary
RFC 2231's header names Ned Freed and Keith Moore. Its immediate predecessor, RFC 2184, names the same pair. That is the whole authorship record for this particular mechanism.
Patrik Fältström belongs to the broader history of Internet internationalisation — but not as an RFC 2231 co-author. RFC 3490, the original Internationalizing Domain Names in Applications specification, lists Fältström with Paul Hoffman and Adam Costello. Folding that separate contribution into the authorship of MIME parameter continuations would blur exactly the boundary standards documents exist to keep: adjacent work can share a problem space without sharing an author list or a protocol contract.
Freed's place in the larger MIME story is well documented. The IETF Datatracker records a long body of email and media-type work. Nathaniel Borenstein, remembering their collaboration, described how his appetite for richer mail met Freed's obsession with robustness and interoperability. RFC 2045 and RFC 2047 map that wider programme: structured Internet message bodies on one side, encoded non-ASCII header text on the other. RFC 2231 took on the narrower parameter problem that remained.
That narrower scope matters. The document never claimed every header could sprout a star suffix and inherit these semantics; a specification has to opt a parameter syntax into the convention. Nor did the work turn filenames into identity claims. It solved a representation and interoperability problem and left content disposition and local safety to other rules.
HTTP kept the encoding idea and dropped the continuations
Later HTTP specifications make the separation easy to see. RFC 8187 carries the encoded-parameter form into HTTP header fields, with UTF-8 as the required charset, but leaves out RFC 2231 continuations. HTTP did not need them. The family resemblance is real; the profile is deliberately smaller.
RFC 6266, which defines Content-Disposition in HTTP, repeats the crucial status of a filename: advisory only. Recipients should discard path segments, keep control of the target directory, distrust extensions that can grant executable meaning, strip confusing control characters, and handle special names. A server can propose a label; it cannot reach through the response and seize authority over a client's filesystem.
That is the deeper legacy of the continuation design. Interoperability needs strict shared rules at the representation boundary: zero-based numbering, a complete sequence, one initial charset declaration, a deterministic decoding order. Security needs equal strictness about what those rules do not prove. A string can be reconstructed without becoming safe. Metadata can be meaningful without becoming sovereign.
Sources
- IETF Datatracker, Ned Freed
- Nathaniel Borenstein, Remembering Ned Freed
- RFC 2045, MIME Part One
- RFC 2047, MIME Part Three
- RFC 2183, Communicating Presentation Information
- RFC 2184, MIME Parameter Value and Encoded Word Extensions
- RFC 2231, MIME Parameter Value and Encoded Word Extensions
- RFC 3490, Internationalizing Domain Names in Applications
- RFC 6266, Use of Content-Disposition in HTTP
- RFC 8187, Indicating Character Encoding and Language in HTTP Header Field Parameters
Member Briefing
Read the full trend briefing
Members read the full briefing with the source notes behind every finding.
Strategic Circle
A daily briefing in your language, built from changes we have verified.
Join for USD 20/monthCancel anytime.
Members also get the full research library, a daily briefing on the networks they follow and the private forum.






