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

Re: Parsing the Injection-Info: header field

On Sat, Jan 09, 2010 at 12:21:42AM +0100, Julien ÉLIE wrote:
> Hi,
> I follow a discussion that was initiated in news.software.nntp:
>    http://groups.google.fr/group/news.software.nntp/browse_frm/thread/c704d0859dd84d38
>    <news:slrnhjcc9b.u40.steve@xxxxxxxxxxxxxxx>
> According to Section 3.2.8 of RFC 5536:
>   injection-info  =  "Injection-Info:" SP [CFWS] path-identity
>                      [CFWS] *( ";" [CFWS] parameter ) [CFWS] CRLF
>      NOTE: The syntax of <parameter> (Section 5.1 of [RFC2045], as
>      amended by [RFC2231]), taken in conjunction with the folding rules
>      of [RFC0822] (note: not [RFC2822] or [RFC5322]), effectively
>      allows [CFWS] to occur on either side of the "=" inside a
>      <parameter>.
> I do not understand well that point.
> Does it mean that CFWS is allowed both before and after the "="?

I believe so, yes.

> Why should RFC 822 be followed here?

This is how I understand it:

Because RFC 2231 is what defines <parameter>, and RFC 2231 is written in the
context of RFC 822 ABNF, not RFC 5322 (or RFC 2822) ABNF.  Thus, the implicit
CFWS semantics of RFC 822 must be applied to the definition of <parameter>,
even though the rest of RFC 5536 follows RFC 5322 in not having implicit CFWS.

I suspect the same note applies to all other nonterminals imported from the
MIME specs (token, value, attribute).

This confusion is caused by that the MIME specs have not (yet?) been updated to
match RFC 5322.  The yam (Yet Another Mail) working group is, AFAICT, the place
where any decision to do that would be initially made.

> And why doesn't RFC 5322 mention that?

Why would it?

> So it shows that a space is allowed before "=".
> Isn't it a difference with RFC 5322 that ought to be mentioned in appendix C?

What difference is that?  RFC 5322 does not define <parameter>.

Antti-Juhani Kaijanaho, Jyväskylä, Finland