W3C home > Mailing lists > Public > ietf-http-wg@w3.org > July to September 2011

Ambiguities in header-field rules (p1-messaging)

From: Frank Mertens <frank@cyblogic.de>
Date: Wed, 17 Aug 2011 19:58:21 +0200
Message-ID: <4E4C013D.2090407@cyblogic.de>
To: ietf-http-wg@w3.org
Hi,

I played around with the ABNF published by this WG and stumbled
over some rough edges.

Current rules:

OWS = *( [ obs-fold ] WSP )
header-field = field-name ":" OWS [ field-value ] OWS
field-value = *( field-content / OWS )
field-content = *( WSP / VCHAR / obs-text )

Problems:

  - field-value and field-content match the empty symbol,
    which requires searching for the longest match, which is costly
    (and confusing for the human reader)
  - because field-value matches the empty symbol claiming it optional
    in header-field allows ambiguous productions of same length
    (with or without field-value of zero length?)

Suggested improvement:

field-value = 1*( field-content OWS )
field-content = 1*( VCHAR / WSP / obs-text )

Best Regards,
Frank Mertens.
Received on Wednesday, 17 August 2011 17:59:16 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 27 April 2012 06:51:46 GMT