Subject: #1079 List header fields without comments

From: Harald Tveit Alvestrand <[email-masked]>
Date: Mon, 10 Oct 2005 15:19:59 +0200

In my search for simple tickets to resolve... this seems to have met favour:

ADD to section 3, before section 3.1:

  The following header fields defined here do not allow comments (CWFS):

    Newsgroups
    Path
    Followup-to
    Control
    Supersedes
    Distribution
    Xref
    Lines
    Expires

  This also applies to the following header fields defined in RFC 2822:

    Message-ID
    Date

  Several of hese headers are mainly of interest to servers,
  and servers often need to process these fields very rapidly.

REMOVE the corresponding paragraph from sections 3.1.5 (Newsgroups).

It seems that 3.1.5 was the only place the text occured.

(Note: 2822 also disallows comments in several other fields, including 
From:, where it is only permitted as part of the "obsolete" syntax. I don't 
think we need to mention that.)

                     Harald

---

From: Russ Allbery <[email-masked]>
Date: Mon, 10 Oct 2005 10:27:24 -0700

>  The following header fields defined here do not allow comments (CWFS):

[...]

>    Date

Date is something of a special case since, unlike those other headers, it
does allow *trailing* comments.  (Likewise with Expire.)

> From:, where it is only permitted as part of the "obsolete" syntax. I
> don't think we need to mention that.)

Hm, is it worth mentioning that the:

    From: [email-masked] (Russ Allbery)

form that, as I recall, is explicitly allowed and suggested by RFC 1036
should no longer be used?

-- 
Russ Allbery ([email-masked])             <http://www.eyrie.org/~eagle/>

---

From: Harald Tveit Alvestrand <[email-masked]>
Date: Mon, 10 Oct 2005 23:14:40 +0200

> does allow *trailing* comments.  (Likewise with Expire.)

(blush) missed that. I'll remove them from the list.
(the CFWS is part of the date-time syntax, which surprised me)

> should no longer be used?

hmmm... I'd better double-check that ABNF.....

 from = "From:" mailbox-list CRLF

 mailbox-list = (mailbox *("," mailbox)) / obs-mbox-list

 mailbox = name-addr / addr-spec

 addr-spec = local-part "@" domain

 domain = dot-atom / domain-literal / obs-domain

 dot-atom = [CFWS] dot-atom-text [CFWS]

so this is legal:

and the comment is syntactically part of the domain... I did NOT expect 
that!!!!!!!!!!!!!!!!

          Harald, who shouldn't speak before reading ALL the ABNF....

---

From: Frank Ellermann <[email-masked]>
Date: Tue, 11 Oct 2005 03:08:36 +0200

[...]
> the comment is syntactically part of the domain... I did
> NOT expect that!!!!!!!!!!!!!!!!

Yes, <id-right> is only a bad name, not a bad idea, it's
more or less the same as <domain> without the [CFWS].  An
"unexpected feature" that <id-domain> would avoid. ;->

---

From: "Charles Lindsey" <[email-masked]>
Date: Tue, 11 Oct 2005 10:41:50 GMT

>(the CFWS is part of the date-time syntax, which surprised me)

Indeed. RFC 2822 also deprecates some more bizarre foldings (and we
inherit that deprecation), but the trailing comment is regularly used to
hold a humanly recognizable (though possibly ambiguous) version of the
<zone> (such as "EST"). Indeed, USEAGE blesses that practice.

>  From: [email-masked] (Russ Allbery)

But RFC 2822 deprecates that as a regular usage, and again we inherit that
deprecation so we no longer explicitly mention it in USEFOR, though it
gets a mention in USEAGE.

-- 
Charles H. Lindsey ---------At Home, doing my own thing------------------------
Tel: +44 161 436 6131 Fax: +44 161 436 6133   Web: http://www.cs.man.ac.uk/~chl
Email: [email-masked]      Snail: 5 Clerewood Ave, CHEADLE, SK8 3JU, U.K.
PGP: 2C15F1A9      Fingerprint: 73 6D C2 51 93 A0 01 E7 65 E8 64 7E 14 A4 AB A5