- From: Kari hurtta <hurtta-ietf@elmme-mailer.org>
- Date: Thu, 30 Jun 2016 23:25:55 +0300 (EEST)
- To: Martin Thomson <martin.thomson@gmail.com>
- CC: Kari hurtta <hurtta-ietf@elmme-mailer.org>, HTTP working group mailing list <ietf-http-wg@w3.org>, Mike Bishop <Michael.Bishop@microsoft.com>, Mark Nottingham <mnot@mnot.net>
Martin Thomson <martin.thomson@gmail.com>: (Thu Jun 30 04:18:57 2016) > On 29 June 2016 at 02:09, Kari hurtta <hurtta-ietf@elmme-mailer.org> wrote: > > 1) Pick first matching member > > 2) Pick last matching member > > 3) Treat "http-opportunistic" as invalid > > 4) Merge some way all matching members > > Or 5) pick any matching member. > Or 6) leave it to chance. > > I think that given the state of JSON parsers, we should take option 6. > Not all parsers will make duplicate keys detectable. And some > generate fatal errors. > > Thus: A client MAY use any matching origin object, but by preference > they SHOULD pretend that conflicting values don't exist. > > I think that's it's worth explaining why we choose this option too. > How does https://github.com/httpwg/http-extensions/pull/205 look to > you? | The JSON format for the http-opportunistic resource makes it possible to | include multiple values for the same origin. Variations in case allow for duplicate | keys that a JSON parser will treat as different. Duplicated keys might not be | detected by a client (see Section 4 of {{RFC7159}}). A client SHOULD NOT use | origin objects if multiple keys match, though it MAY use any origin | object with a matching key. Looks good. I see that requiring more means that client must implement JSON parser itself. https://tools.ietf.org/html/rfc7159#section-4 | Many implementations report the last name/value pair | only. Other implementations report an error or fail to parse the | object, and some implementations report all of the name/value pairs, | including duplicates. So there may be similar problem also with "lifetime", "tls-ports" and "tls-commit" members. Perhaps: " A client MAY treate http-opportunistic invalid as whole if it includes duplicate member names on some object. A client SHOULD NOT use the origin object, if it includes duplicate member names. " This allows fatal errors when there is duplicate on some object (even when it is not current origin). / Kari Hurtta
Received on Thursday, 30 June 2016 20:26:36 UTC