Subject: Re: [httpwg/http-extensions] Can dictionary keys repeat? (#281)

From: HTTP issue updates <[email-masked]>
Date: Mon, 29 Jan 2018 16:33:15 -0800

So, in the current iteration of structured headers, I think this question applies to both Dictionaries and Parameterised Labels.

Currently, Dictionaries forbid repeating members ("If dictionary already contains this_key, raise an error."). Similar language is in the parsing algorithm for parameterised labels. 

If that remains, it would be good to reinforce this in requirements (rather than just leaving it in the algorithms) for Dictionaries; Parameterised Labels already does that.

**If** Alt-Svc were defined as a structured header, I think QUIC's use case could be shoe-horned in; e.g.,

    Alt-Svc: hq=":49288";quic="1,51303334"

That's not pretty, of course, but I question how common this particular scenario is (most headers that need to be ordered can just use a list).

For @jyasskin's use case, something similar can happen (whitespace is a natural choice for delimiting URLs); e.g.,

    Signature: sig2;
      sig=*MEQCIGjZRqTRf9iKNkGFyzRMTFgwf/BrY2ZNIP/dykhUV0aYAiBTXg+8wujoT4n/W+cNgb7pGqQvIUGYZ8u8HZJ5YH26Qg;
      validityUrl="https://example.com/resource.validity https://fallback.example.net/foo";
      certUrl="https://example.com/certs https://and.another.example.org/bar";
      certSha256=*kQAA8u33cZRTy7RHMO4+dv57baZL48SYA2PqmYvPPbg;
      date=1511301183; expires=1511905983

If we allowed multiple instances of Dictionary (and Parameterised Label) keys, I'm concerned that it would be significantly more difficult to map structured headers into common data structures, and therefore would increase the friction against the introduction of generic parsing and serialisation tools for them -- as well as complicate their use. Remembering that the goal for SH is **not** to be able to express every conceivable header, but to get the 80% of "cream", I think this is a good tradeoff.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/httpwg/http-extensions/issues/281#issuecomment-361435427

---

From: HTTP issue updates <[email-masked]>
Date: Tue, 30 Jan 2018 00:40:58 +0000 (UTC)

I can live with guidance to represent arrays by defining a custom parser within strings.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/httpwg/http-extensions/issues/281#issuecomment-361436751

---

From: HTTP issue updates <[email-masked]>
Date: Thu, 01 Feb 2018 06:55:15 +0000 (UTC)

Closed #281 via dfbd3f165cdd4b5d6ca12b3265043bd1c3e34d5f.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/httpwg/http-extensions/issues/281#event-1452333662