Subject: draft-ietf-httpbis-header-structure-15, 3.2. Dictionaries

From: Kari Hurtta <[email-masked]>
Date: Wed, 12 Feb 2020 08:09:00 +0200 (EET)

3.2.  Dictionaries
https://tools.ietf.org/html/draft-ietf-httpbis-header-structure-15

|   A dictionary with a mix of singular and list values, some with
|   parameters:
|
|   Example-MixDict: a=(1 2), b=3, c=4;aa=bb, d=(5 6);valid=?1

but

3.1.2.  Parameters
https://tools.ietf.org/html/draft-ietf-httpbis-header-structure-15#section-3.1.2

|   Parameters whose value is Boolean true MUST omit that value when
|   serialised.  For example:
|
|   Example-IntHeader: 1; a; b=?0

/ Kari Hurtta

---

From: Mark Nottingham <[email-masked]>
Date: Wed, 12 Feb 2020 11:37:57 +0000

Fixed in the Editor's Draft; thanks.

> On 12 Feb 2020, at 6:09 am, Kari Hurtta <[email-masked]> wrote:
> 
> 3.2.  Dictionaries

--
Mark Nottingham   https://www.mnot.net/

---

From: Kari Hurtta <[email-masked]>
Date: Sun, 16 Feb 2020 19:38:16 +0200 (EET)

4.1.6.  Serializing a String
https://tools.ietf.org/html/draft-ietf-httpbis-header-structure-15#section-4.1.6

Output is restricted ASCII, but this alogrithm seems not say that
input_string is limited to ASCII

|   Given a string as input_string, return an ASCII string suitable for
|   use in a HTTP header value.
|
|   1.  If input_string is not a sequence of characters, or contains
|       characters in the range %x00-1f or %x7f (i.e., is not in VCHAR or
|       SP), fail serialisation.

In other words, should this fail serialization if input_string is not
ASCII string ?

Now failing is implicit, because there is just

|       2.  Append char to output.

And if char is not ASCII then "return an ASCII string" part
is violated.

/ Kari Hurtta

---

From: Mark Nottingham <[email-masked]>
Date: Tue, 18 Feb 2020 15:53:00 +1100

Hi Kari,

> On 17 Feb 2020, at 4:38 am, Kari Hurtta <[email-masked]> wrote:
> 

That's one of the effects of this step, yes. See the definition of the string data type at:
  https://httpwg.org/http-extensions/draft-ietf-httpbis-header-structure.html#string

---

From: Kari Hurtta <[email-masked]>
Date: Tue, 18 Feb 2020 19:08:04 +0200 (EET)

> > And if char is not ASCII then "return an ASCII string" part

Well, I disagree that this is ready.

4.1.5.  Serializing a Decimal
https://tools.ietf.org/html/draft-ietf-httpbis-header-structure-15#section-4.1.5

tries define rounding.

This means that input_decimal is NOT decimal as defined on

3.3.2.  Decimals
https://tools.ietf.org/html/draft-ietf-httpbis-header-structure-15#section-3.3.2

So that this is consistent

input_string is NOT string as defined on

3.3.3.  Strings
https://tools.ietf.org/html/draft-ietf-httpbis-header-structure-15#section-3.3.3

So let input_decimal to be some kind generic/abstract decimal number and
therefore input_string to be some kind generic/abstract string.

Make this failure more explicit. For example:

  1.  Convert input_string into an ASCII string ascii_string; if
      conversion fails, fail serialisation.

  2.  If ascii_string contains characters in the range %x00-1f or 
      %x7f (i.e., is not in VCHAR or SP), fail serialisation.

  3.  Let output be an empty string.

  4.  Append DQUOTE to output.

  5. For each character char in ascii_string:

     and so on

/ Kari Hurtta

---

From: Mark Nottingham <[email-masked]>
Date: Wed, 19 Feb 2020 12:56:27 +1100

> therefore input_string to be some kind generic/abstract string.

See discussion and proposal at:
  https://github.com/httpwg/http-extensions/issues/1055

>  5. For each character char in ascii_string:

That makes sense; likewise for tokens and keys. I've added a note to deal with this in #1055.

Cheers,