empty lists, was: Benjamin Kaduk's Discuss on draft-ietf-httpbis-header-structure-18: (with DISCUSS and COMMENT)

On 19.05.2020 07:13, Mark Nottingham wrote:
> ...
>> Most notably, there is the inherent risk of skew when both prose
>> algorithms and ABNF constructions are provided for the same structures.
>> While Section 1.2 is careful to disclaim that the prose algorithm takes
>> precedence over the ABNF for parsing, to my reading the coverage in the
>> following paragraph of serialization procedures imply that it is the
>> ABNF that is authoritative.  In particular, "[i]mplementations MAY vary
>> from the specified behavior so long as the output still matches the
>> ABNF" seems to admit deviations from the prose algorithms but require
>> compliance with the ABNF, in effect making the ABNF take precedence over
>> the prose algorithm.  Having a different description of the procedure
>> normative for generation vs. consumption invites
>> interoperability-affecting feature skew, such as the handling of empty
>> lists as Julian noted on the list.
>
> I think the solution here is to change the last paragraph of Notational Conventions to:
>
> """
> For serialization to HTTP fields, the ABNF illustrates the expected wire representation with as much fidelity as possible, and the algorithms define the recommended way to produce them. Implementations MAY vary from the specified behavior so long as the output is still correctly handled by the parsing algorithm.
> """
>
> Does that work for you, Ben?
> ...

It really doesn't help a lot with the case of:

   Foo:

What's the point in disallowing this in the ABNF (and on the wire) when
the normative parsing algorithm will accept it?

Best regards, Julian

Received on Tuesday, 19 May 2020 10:04:54 UTC