RFC 934's problem: when a dash stops being punctuation

Picture a 1985 mail digest: three messages stapled into one, separated by lines that begin with a single dash. Now picture a fourth item inside it — a quotation, a shell transcript, a sign-off — whose first line also begins with a dash. The reader's software has no way to know which dash is a staple and which is text. That is not a typographic quibble. It is the moment a format discovers that its punctuation and its payload share an alphabet.

An Internet message was already a structured object before anyone thought to stuff it with dashes. RFC 822, David Crocker's 1982 grammar for ARPA Internet text messages, drew a hard line at the first empty line: above it, fields with colons, quotation marks and backslashes; below it, text. The same character could be grammar in one place and payload in another, and nobody found that strange, because that is what a parser is — a machine that decides, from where it is standing, what a byte means.

The body was the loose part. RFC 822 called everything after the first null line text, which was a strength for early mail and a headache for anyone who wanted to put a whole message inside another message and get it back out intact.

RFC 934, published in January 1985 by Einar Stefferud, proposed two workers for that job: a forwarding agent that composes the outer draft before posting, and a bursting agent that takes it apart after delivery. The outer body could hold an introduction, one or more enclosed messages, and a sign-off. The separator got a name — the encapsulation boundary — and a definition of almost comic modesty: any line beginning with a dash.

Read that carefully. The dash is not a symbol of messagehood. It is an instruction to a burster that has already entered a particular state and is scanning at the start of a line. Two adjacent boundaries can bracket an empty message; one boundary can close an inner message and open the next. Outside that grammar, the byte has no authority at all.

That is the first discipline worth keeping, and it is older than the Internet: a delimiter is not a label stuck onto reality. It is a limited instruction to an interpreter that knows where it is standing. Forget the second half and you get the oldest failure in computing — data starts issuing commands because the context that made it data has been mislaid.

The fix: a dash and a space, added on the way in

The collision was sitting in the payload all along. A forwarded message is made of lines. Some of them begin with a dash and mean nothing by it: a quotation, a command example, a bullet, a sign-off. Drop that message inside an envelope and the envelope can no longer tell its own stitching from its contents.

Stefferud noticed that existing forwarders mostly ignored the problem, and rather than declaring the ambiguity solved by fiat, he supplied a transformation. When the forwarding agent meets a line in the enclosed text that begins with the boundary character, it emits a dash and a space first. A payload line reading - notice travels as - - notice. On the way out, the burster sees dash-space, concludes this is escaped data rather than a real boundary, strips the added prefix, and emits the rest. The RFC calls it a simple character-stuffing scheme that permits recursive forwarding, and it is exactly that: unglamorous, local, invertible.

The elegance is that the outer writer never has to decide what the inner line means. It only stops the outer grammar from mistaking the line for one of its own control points, and the outer reader undoes precisely that intervention on the way back. The data recovers its earlier shape because the transformation left a witness — a small, recognizable, local mark of what was added and by whom.

RFC 822 had already sketched the same instinct in another room: a message crossing a network boundary should return to canonical form before the next network's local conventions are imposed. The pattern is not that transformations are harmless. It is that a transformation needs an owner, a stated scope, and a reversal point. Meaning must not accumulate local habits simply because it travelled.

Reversible is not free: how recursive quoting grew the line

Here is where the story stops being tidy. RFC 934's claim about recursion is true in the narrow sense that matters: one layer escapes, one layer unescapes, and a nested message survives the round trip if everyone plays by the grammar.

But look at the line while it is in transit. Suppose the protected text is already - - notice because an inner wrapper escaped it. A second forwarder sees a line beginning with a dash, and adds its own dash-space. Now it reads - - - notice. A third layer makes it longer again. Each burster removes only the prefix it is responsible for, so nothing is lost — and nothing shrinks either.

The cost is physical, not grammatical. The line grows while it travels. A scheme that is perfectly invertible at one level becomes awkward to carry, inspect, relay or preserve when it is embedded five times, and the awkwardness lands on the parts of the system nobody diagrams: line-length budgets, relays that wrap, gateways that normalize whitespace, and operators trying to work out which layer inserted which prefix.

That distinction escapes mail entirely. A round-trip test proves that an encoder and its matching decoder agree at the nesting depth you tested. It does not prove that a relay preserves the expanded form, that a line budget survives, that an intermediary will not quietly rewrap the evidence, or that a human can still tell which layer did what. Intermediate state is not an embarrassment to be waved away. It is where systems actually interoperate, and where they actually break.

RFC 934 did not pretend otherwise. It was built to minimize changes to existing forwarding agents, and it recommends that implementers wanting compatibility with existing bursters consider blank lines around boundaries — then immediately notes that a forwarder strictly adhering to the proposal should not generate them. That is not a contradiction. That is a document recording a live compatibility field rather than a clean room in which one published grammar could erase prior practice.

MIME's answer: declare the boundary instead of escaping the payload

Eleven years later, RFC 2045 described MIME as building on earlier work including RFC 934, RFC 822 and RFC 1049, and gave message bodies types, content descriptions and multipart structure. It did not declare old mail obsolete on publication day. It offered a new shared syntax to anyone who chose to use it.

RFC 2046 then moved the framing decision. A multipart Content-Type declares a boundary parameter; the delimiter line is two hyphens followed by that declared value; the value must not appear inside an enclosed part, either as a line by itself or as the prefix of a line; nested multiparts must use distinct values. The composer now carries a concrete obligation — pick a boundary that will not collide with what you are wrapping.

The boundary is still not a global truth. Its authority comes from the enclosing entity's declared parameter and the multipart grammar. The same characters sitting in an unrelated plain-text body mean nothing structural at all, because no header has claimed them. Header and body cooperate to state what is structural and where that claim applies.

RFC 2046 is unusually candid about the comparison. The two leading hyphens exist partly for rough compatibility with the RFC 934 method and partly to help implementations search. But multipart messages, it says, are not completely compatible with RFC 934 encapsulations: they do not follow the older convention of quoting embedded lines that begin with hyphens. The stated reason is precisely the composition problem — the older convention makes lines grow at every level of quoting, and paired with SMTP implementations that sometimes wrap long lines, that made it unsuitable for deeply nested multipart bodies.

That is not a verdict against RFC 934. It solved a real collision with a tiny parser and an invertible local transform. MIME faced a typed, potentially deep body model and moved the collision-avoidance work upstream, into boundary selection. Both designs still demand evidence: a MIME writer must know enough about the payload to avoid a collision, a receiver must parse the right enclosing declaration before honouring a delimiter, and a gateway must preserve the bytes and the line endings. The new design changes the accounting of ambiguity. It does not abolish it.

Why the growing dash still matters

The lesson is not that everything should be character-stuffed, or that everything should be MIME. It is a question to put to any layered format: when a symbol acquires structural authority, how precisely does it lose it again?

For RFC 934 the answer is visible in the mechanism. The forwarder inserts dash-space; the burster removes it; the inner message gets its line back. For MIME the answer starts earlier: the sender declares a boundary for this entity and keeps it out of the enclosed material, and the receiver applies that declaration only to the entity it is parsing. Structure is scoped by the enclosing header rather than inferred from a stray dash in the wider world.

These are small mechanisms with a large governance consequence, and the failure mode is always the same shape: a temporary marker outlives its jurisdiction. A transit escape gets stored as canonical data. A cache entry is mistaken for a permanent identity. A parser rule is applied before its envelope has been established. A presentation label is promoted into an executable instruction. The remedy is never ceremony. It is a narrow common rule, local validation, an observable transformation, and a way back.

Lu Heng makes the same point at the layer where it costs money: where registry procedure conflicts with running networks, the networks win. Running code is not a slogan about pragmatism; it is a claim about where authority actually lives — in the transformations that deployed writers, relays and readers can perform together, not in the elegance of a rule on paper.

So ask of any format what RFC 934's expanding dash forces you to ask: does this transformation grow under composition, who observes the growth, where does it hit a limit, and can another layer normalize it without erasing the information needed to reverse it? Those questions turn an abstract escaping convention into an operational design review — and they are why a single hyphen, repeated, is still teaching the Internet the difference between a boundary and a wall.

Sources and evidence limits

The closed evidence set is RFC 822, RFC 934, RFC 2045 and RFC 2046. It establishes the historical formats, the stated forwarding and bursting rules, and MIME's documented contrast with RFC 934. It does not establish universal deployment, the behaviour of any contemporary mail product, the safety of any particular parser, or a measured frequency of deeply nested mail.