[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nmh-workers] nmh internals: full MIME integration

From: Robert Elz
Subject: Re: [Nmh-workers] nmh internals: full MIME integration
Date: Sun, 27 Jul 2014 16:49:34 +0700

    Date:        Sat, 26 Jul 2014 22:07:48 -0700
    From:        Lyndon Nerenberg <address@hidden>
    Message-ID:  <address@hidden>

  | The ABNF has never allowed spaces between the header "tag" (for want of
  | a word) and the ":" (going back to RFC 822).

No, that's incorrect (or misleading anyway).   While if you just read 822's
ABNF there are no spaces allowed, there aren't any anywhere else either.
The ABNF needs to be read in conjunction with the text, which in 822 permitted
white space (including comments) between any two tokens.     That includes
the field name and the following ':', so in 822 it was perfectly legal to do...

        To (Primary intended destination) : address@hidden

(and similar) though I don't think anyone ever put comments there, so
handling that now (for backward compat) would be going way overboard.
Mailers did however generate spaces between the field-name and the ':'
(some used to carefully align all the ':'s in the header...)

To fix that (and many other even more bizarre) possible uses of white
space (and comments) that 822 allowed, but no-one ever did (the field name
and ':' don't even have to be on the same line, folding white space is
permitted between as well..) is one of the reasons that the grammar was
totally reworked in 2822, and all white space (and locations where comments
were permitted, and folding) was made explicit, and the "between any two
tokens" stuff was deleted (and while 2822 allows lots of "obs-xxx" stuff
for backwards compat, as "parse but do not generate", most of the most
bizarre, and unused, possibilities from 822 were simply dropped completely.)

But in both 822 and 2822 (and 5322 of course) the grammar and the text
need to be read together, or what you end up with will be nothing like what
is actually intended (822 seemed to require headers in a particular order
if you just read the grammar, 2822's grammar appears to have no restrictions
on order or number at all - neither of those is correct).


reply via email to

[Prev in Thread] Current Thread [Next in Thread]