Re: Working Group Last Call: Structured Headers for HTTP

On 25.02.2020 07:13, Mark Nottingham wrote:
>
>
>> On 25 Feb 2020, at 5:08 pm, Julian Reschke <julian.reschke@gmx.de> wrote:
>>
>> I understand that. What trips me up is that we we have to different
>> cases: one in which the shorter notation MUST be used, one in which it
>> MUST NOT be used. Am I the only one who thinks that this is sub-optimal?
>>
>> In a perfect world, the serialization should not depend on the context
>> it appears in. I understand that this is a trade-off, but it would be
>> good to see more context about how we got there, and whether
>> alternatives were discussed.
>
> If you're referring to the case of a Boolean as a Dictionary value (and it would be good if you confirmed that this is what you had in mind; if you're talking about Booleans wherever they might appear, I don't know how that would work), it was considered, but IIRC it would have required a substantially more complicated parsing algorithm, because of cases like this:

Yes.

> Example-Field: ;param=on-default-boolean
>
> Parameter values are comparatively simpler, because they can't have any further substructure.

I don't quite get the example. In the spec I see:

   Example-DictHeader: a=?0, b, c=?1; foo=bar

If this would be instead:

   Example-DictHeader: a=?0, b, c; foo=bar

...what would break?

Best regards, Julian

PS: I'm tempted to propose "!a" instead of "a=?0" :-)

Received on Tuesday, 25 February 2020 08:07:06 UTC