Boolean param notation, Re: Benjamin Kaduk's Discuss on draft-ietf-httpbis-header-structure-18: (with DISCUSS and COMMENT)

On 19.05.2020 07:13, Mark Nottingham wrote:
> ...
>> What's the motivation for "MUST omit values of boolean true" (in
>> parameters and dictionaries)?  It seems to make the output rules more
>> complicated without a significant gain in encoding size.
>
> It allows some existing HTTP headers to be treated as structured for the purposes of serialisation.
> ...

Well, the introduction states that redefining existing fields is a
non-goal...

IMHO...

- the reason for "MUST" is that we want exactly one way to serialize

- the reason for "omit true values" is not only saving bytes, but
improving readability (if the on-the-wire syntax is more ugly that
needed, potential users might opt into defining their own syntax instead)

BTW: we have a shorthand syntax for true values, but not for false. One
could argue we should have both (such as "!foo" == "foo=?0"), but on the
other hand, the current state makes it attractive to always define
Boolean params to "false", so that "foo=?0" will never actually occur on
the wire; and that probably is a good thing, too).

Best regards, Julian

Received on Tuesday, 19 May 2020 09:47:03 UTC