Re: empty lists?, was: Last Call: <draft-ietf-httpbis-header-structure-18.txt> (Structured Field Values for HTTP) to Proposed Standard

Julian Reschke <julian.reschke@gmx.de> Tue, 19 May 2020 02:53 UTC

Return-Path: <ietf-http-wg-request+bounce-httpbisa-archive-bis2juki=lists.ie@listhub.w3.org>
X-Original-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Delivered-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id D76E73A07CA for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Mon, 18 May 2020 19:53:33 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.749
X-Spam-Level:
X-Spam-Status: No, score=-0.749 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=gmx.net
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 52ESNC3XRspl for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Mon, 18 May 2020 19:53:31 -0700 (PDT)
Received: from lyra.w3.org (lyra.w3.org [128.30.52.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 5661A3A07E7 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Mon, 18 May 2020 19:53:30 -0700 (PDT)
Received: from lists by lyra.w3.org with local (Exim 4.92) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1jasKr-0006cm-KM for ietf-http-wg-dist@listhub.w3.org; Tue, 19 May 2020 02:50:29 +0000
Resent-Date: Tue, 19 May 2020 02:50:29 +0000
Resent-Message-Id: <E1jasKr-0006cm-KM@lyra.w3.org>
Received: from titan.w3.org ([128.30.52.76]) by lyra.w3.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <julian.reschke@gmx.de>) id 1jasKq-0006c0-JE for ietf-http-wg@listhub.w3.org; Tue, 19 May 2020 02:50:28 +0000
Received: from mout.gmx.net ([212.227.15.18]) by titan.w3.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from <julian.reschke@gmx.de>) id 1jasKo-0000eS-4z for ietf-http-wg@w3.org; Tue, 19 May 2020 02:50:28 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1589856601; bh=wJOm/CgiwfrQ/KGA5AYfLWemaxpJHL7qGr+HUURGKjA=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=CaMjSBr2PAj4ECejj2qFf7R6e7WELJmIge46qSDdsYJTP9C5aGOqmdqxaFrmAjPAN dAP8Oux+pfC/WfDmHQzQwU+g9W8VG8XoPEyBfuWEibin7CiO0Wx0FThV6yhcGe6sYE dzXAbVktrB1ykr2voTSviexROFxxA1tk2tVa8au8=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from [192.168.178.182] ([91.61.53.112]) by mail.gmx.com (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MpUZ4-1jIMUf1EAW-00ptxr; Tue, 19 May 2020 04:50:01 +0200
To: Mark Nottingham <mnot@mnot.net>, Benjamin Kaduk <bkaduk@akamai.com>
Cc: last-call@ietf.org, httpbis-chairs@ietf.org, HTTP Working Group <ietf-http-wg@w3.org>, Barry Leiba <barryleiba@gmail.com>, draft-ietf-httpbis-header-structure@ietf.org
References: <158740521959.1174.9556681562748997101@ietfa.amsl.com> <bb3a29ff-1a0f-964d-c764-4d4819d338da@gmx.de> <1d494d71-b837-729a-62f3-5ba8ca6549cb@gmx.de> <20200518182746.GC3811@akamai.com> <45ec9bc0-2a81-edf1-6054-7c5bb3cb8140@gmx.de> <20200518212334.GD3811@akamai.com> <721A2334-D1C9-4A34-BE4C-0FA540B4E9D4@mnot.net>
From: Julian Reschke <julian.reschke@gmx.de>
Message-ID: <ab410de8-ee88-d359-db8c-85fb8bb3dd43@gmx.de>
Date: Tue, 19 May 2020 04:49:58 +0200
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0
MIME-Version: 1.0
In-Reply-To: <721A2334-D1C9-4A34-BE4C-0FA540B4E9D4@mnot.net>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: quoted-printable
X-Provags-ID: V03:K1:bwW12hNXS1nfGUpj5krVgnGGZBfatiQqscWg8A9j5f+qGnYoGR4 HT/vMDohoaUz1gZ4Z3jfbpwsPJokQmCoBBow1qRJX9rd0gD9/x0sKtbsvUAlqGNhDkk7wGX my27mNCZVzXHKlpjFgcUm5YBmQrwxjSfw2tWge/j76TtmaTFu92jIPtJZwpQ14AugESiZVX s7aTC2uHkjpGy4NujCTKg==
X-UI-Out-Filterresults: notjunk:1;V03:K0:IbgkX+RseDo=:nN5RRxHy+Ua84+ATEa3JDg rQ0oyRo0XdkbhfEeyMPk04j+3pn4WzbORJMPXsUhhkCrDnV3Mjf/4ijWalKVXalJItoVDRD7V tGPQCqWqwz8sujVmji/hiUmOBldN23WGQs3vtBzOtxEzh3rYukcyG6AzGfPwxxNBHlCZPW3zU smgyWX6Hs891gHOQFl+B5GVTMYkb/og5HZF2n4ZQzkRU8pxw4KVVq/ekBqifvTbeRyzVSKGgO ZGcP/Dt4ni8K0MzzcCLseaSeuEhBZqPglE2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X-W3C-Hub-Spam-Status: No, score=-5.6
X-W3C-Hub-Spam-Report: BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, W3C_AA=-1, W3C_IRA=-1, W3C_WL=-1
X-W3C-Scan-Sig: titan.w3.org 1jasKo-0000eS-4z 647d819832040af4ab9a304e2a2d1278
X-Original-To: ietf-http-wg@w3.org
Subject: Re: empty lists?, was: Last Call: <draft-ietf-httpbis-header-structure-18.txt> (Structured Field Values for HTTP) to Proposed Standard
Archived-At: <https://www.w3.org/mid/ab410de8-ee88-d359-db8c-85fb8bb3dd43@gmx.de>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/37659
X-Loop: ietf-http-wg@w3.org
Resent-Sender: ietf-http-wg-request@w3.org
Precedence: list
List-Id: <ietf-http-wg.w3.org>
List-Help: <https://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

On 19.05.2020 01:20, Mark Nottingham wrote:
>
>
>> On 19 May 2020, at 7:23 am, Benjamin Kaduk <bkaduk@akamai.com> wrote:
>>
>>>> You saw
>>>>
>>>>     An empty List is denoted by not serializing the field at all.
>>>>
>>>> right?
>>>
>>> That's about serialization.
>>>
>>> 4.2.1 seems to parse an empty string into an empty list.
>>>
>>> AFAICT, that's in conflict with the ABNF.
>>
>> Thanks for clarifying.
>
> As per S 1.2 [1], the ABNF is not for parsing; it's for 'illustrat[ing] the range of acceptable wire representations.'
>
> The ABNF requires at least one member because sending an empty field value is not good practice; it's not something we encourage.
> ...

So the real inconsistency here is that sending an empty value is not ok
(forbidden?, not encouraged?), but an empty string is a valid parser input.

That is confusing; if that's really intended, it should be explained
somewhat more. AFAIC, it would be way easier just to align "what can be
in a field value" with "what the parser accepts as input".

> ...

I note that there is a test called "empty list" at
<https://github.com/httpwg/structured-header-tests/blob/master/list.json#L8>:

>     {
>       "name": "empty list",
>       "raw": [""],
>       "header_type": "list",
>       "expected": [],
>       "canonical": []
>     },

<https://github.com/httpwg/structured-header-tests/blob/master/README.md>
says:

> raw: An array of strings, each representing a header field value received

I understand that the tests are not part of the spec, but this seems to
support the case that empty field value should be accepted.

Best regards, Julian