Re: ABNF for field-value

On 2012-09-02 17:02, Adrian Custer wrote:
> Hey all,
>
> Section 3.2.2 of version 20 of the current draft, in the second
> paragraph, states:
>    "The field value does not include any leading or
>     trailing white space: ..."
> so should the ABNF not be something like
>
> field-value = (VCHAR / obs-text) [ *(field-content / obs-fold)
>                                     (VCHAR / obs-text) ]
>
> (ignoring the line break which may alter the semantic meaning)?
>
> The current ABNF allows both leading and trailing whitespace, indeed
> would allow the whole value to be a space.
>
> Since this definition would force the field-value to be non-empty, this
> approach would require allowing the field-value to be optional in the
> <header-field> element rather than requiring a, possibly empty,
> field-value. That approach makes more logical sense to me but might have
> repercussions of which I am unaware.
> ...

As far as I can tell, this would work, too, but I'm not sure it's an 
improvement.

At the end of the day, the ABNF definitions do not tell you all you need 
to know, so there's also value in keeping them readable.

Best regards, Julian

Received on Thursday, 6 September 2012 09:05:49 UTC