Ambiguities in header-field rules (p1-messaging)

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 UTC