nmh-workers
[Top] [All Lists]

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

2014-07-27 04:53:32
    Date:        Sat, 26 Jul 2014 22:07:48 -0700
    From:        Lyndon Nerenberg <lyndon(_at_)orthanc(_dot_)ca>
    Message-ID:  <84DA1252-321F-49D5-BAA5-0ACE76E14F79(_at_)orthanc(_dot_)ca>

  | 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@host

(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).

kre


_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>