[rfc-i] Re: ABNF (RFC2234) vs HTTP's augmented BNF syntax (RFC822 +
blilly at erols.com
Sat Feb 12 17:56:58 PST 2005
> Date: 2005-02-12 14:54
> From: Julian Reschke <julian.reschke at gmx.de>
> I was in the process of upgrading some Internet Drafts to use the ABNF
> defined in RFC2234. All these drafts define extensions/applications of
> HTTP (RFC2616).
> At first I thought that this was a simple "add the reference and apply
> some minor syntax tweaks" thing; but it turns out that RFC2616 modifies
> RFC822's BNF in a way that makes it particularly useful when defining
> HTTP header fields
> (<http://greenbytes.de/tech/webdav/rfc2616.html#rfc.section.2.1>), namely:
That differs only slightly from RFC 822 section 2.7
> implied *LWS
The difference being that RFC 822 allows line folding and
parenthesized comments in addition to linear whitespace.
> So for new specs that define HTTP header fields, what would be the
> preferred approach...?
> 3) Stick with what RFC2234 allows (making the syntax definitions harder
> to read at best)?
> 4) ...?
See RFC 2822, which uses 2234 ABNF with some productions to indicate
combinations of line folding and linear whitespace, and those plus
comments. 2822 has also tightened the generative grammar, such that
empty list elements may no longer be generated, and places where
comments, whitespace, and line folding are permitted have been
limited. RFC 2822 grammar as published contains some ambiguities
and a couple of errors; a possible revision (
) has been discussed on the ietf-822 mailing list.
More information about the rfc-interest