Re: Empty lists in Structured Headers (#781)

Julian Reschke <julian.reschke@gmx.de> Thu, 02 May 2019 06:51 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 AF1E0120240 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 1 May 2019 23:51:41 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.899
X-Spam-Level:
X-Spam-Status: No, score=-2.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, MAILING_LIST_MULTI=-1, 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 4hxiBblH_nWs for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 1 May 2019 23:51:39 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [IPv6:2603:400a:ffff:804:801e:34:0:38]) (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 7C6CE1202F3 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Wed, 1 May 2019 23:51:37 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.89) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1hM5XN-0006f3-Ju for ietf-http-wg-dist@listhub.w3.org; Thu, 02 May 2019 06:49:45 +0000
Resent-Date: Thu, 02 May 2019 06:49:45 +0000
Resent-Message-Id: <E1hM5XN-0006f3-Ju@frink.w3.org>
Received: from titan.w3.org ([2603:400a:ffff:804:801e:34:0:4c]) by frink.w3.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from <julian.reschke@gmx.de>) id 1hM5XL-0006eH-KS for ietf-http-wg@listhub.w3.org; Thu, 02 May 2019 06:49:43 +0000
Received: from mout.gmx.net ([212.227.17.22]) by titan.w3.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from <julian.reschke@gmx.de>) id 1hM5XJ-0001Wp-RN for ietf-http-wg@w3.org; Thu, 02 May 2019 06:49:43 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1556779755; bh=kmDhoXcCH86awUH7fJVfSQhXUiPPoJGvTPR4JCYPWEU=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=Iu6G7u3HaT1sIK+mPvV6HcNZ1/7YQBA+ONlhB2vA9TocRUcNVO3HDeS+7un9Ag+19 1fxbrGn/1RXRjaNTGwfq1E54b9LWJN5Fe9ROVa/LcZGQMly19DQtnKu3ThDbYN/ckV P9QbiBVXi11BoXazHfzaJ0FqXS5q5G3QY1KRV9Es=
X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c
Received: from [192.168.178.124] ([84.171.156.16]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0Li1hG-1gzPtB1qao-00nAjn; Thu, 02 May 2019 08:49:15 +0200
To: Mark Nottingham <mnot@mnot.net>
Cc: "ietf-http-wg@w3.org Group" <ietf-http-wg@w3.org>, Poul-Henning Kamp <phk@phk.freebsd.dk>
References: <D99820F1-D169-468E-BA31-68AA710C3CC4@mnot.net> <ba411a25-c389-3470-5cf3-8abd0779da90@gmx.de> <A9057359-EBD8-4FF9-88A7-851ACA86C2EF@mnot.net>
From: Julian Reschke <julian.reschke@gmx.de>
Message-ID: <f81f2f91-b434-5957-56ad-392ab772c47c@gmx.de>
Date: Thu, 02 May 2019 08:49:13 +0200
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1
MIME-Version: 1.0
In-Reply-To: <A9057359-EBD8-4FF9-88A7-851ACA86C2EF@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:mRwujTdaJy+vRkZ42gQu/iUMgehLWuFmBKVZA874poRAMXWO+SJ U68gtqSi3VVlOpo307ZsTXHKdJn/j82o2L8VjZ+B/CB4h+R+oqDHFJs9r/qzjglzuOc1GDt +OjbPaznweafDlxy70UZCajALHc/9KR1DWtFLhvxJ3HkpP/9PvRJWEzeG2pVNo4AcL/ENzT 4SUp3W+XEoBdJZ2+Ga+BQ==
X-UI-Out-Filterresults: notjunk:1;V03:K0:Uni8OXYP+sU=:7nlvw4HcI+lHXnOrOzGsGf S1AA/BkhoU0iXCx25nCYiMMAi5YPszXxKSLm7YvG3QuMxbGf0cFx2nGboLUz+1Hr3HsKlSkdW 4JSmB87xuqVjwnRzX5dZeE1G5Szc/muLayd5aMhm79vRDyNMa2Qx0hSkLuw8Hi18KVy3aacjd U8d+p0rYPH6omRaBYIloJp3jQVebrEnBGsbLo50ltI33Ud6EJYhcj9JWhArFvLmTQxnFFxiqX 78FAzw0yC2dzg7NqzW/xVOeOfYGYZCx+kIEgSk6bEi41jlhREGsd2aLmvlM1Zsg+LtZDHS4Mv 0uSyJChjmm7WywdCQZbovxu5yw7eMu6yEsI9ljendA6AutqSbzCIiDn1UjUr/z8P/Y2Q1ih9H k1jiEHza495RLAy+cU9RSzbglrkF8ZIUZPkdr4SAK6UCoNNypZWeN6+mCq8gqmHcqES+vsWeH QTOOisQYgKEGa9gcmSPk/6TeBT+KFC6W3Pz5zqJY8Qj1bmHosu1sufZOL9uSsJS2kYnUYCZHD kBuBMdk4GwbtHs5L0LpS3MZFJYvOBgF94jA/N0amXoEBd/6klFDqV4oIU9hM5EyvufLHitpQD 7If0DVDS+siBdmSdrwS+FzgUcNkbKCB97eEVUGBzRMyBHt5jCHiwJaV8s/Q45jgNkyaDIEnzz weEsWYh5Z6trSyDdURkDx9jC5Yde/kytx6deYZt4rpTlZgNK/QncAeklDb3xWF2U8PO0q8PL4 4+846u25lBOek0qwI+ZrCeKKZUkjvtJKI08QfukuzXEqNj8Ith6fttlNImsxz5p8A3KSNQG2o Bfyvsfws2Kgvd5cpcGYMC7gl64j5WwdAYUPgjB64xgN22irLzKPxh/JIdSWXY6Idyn04wh82X pmE2nPXuOmO51nwHBbwTffhiFL+8O8RKmMda3wWKOyH1eNPtSI59l0SDy5IQO837GffoE6rWN mPQbtLuL6Iw==
Received-SPF: pass client-ip=212.227.17.22; envelope-from=julian.reschke@gmx.de; helo=mout.gmx.net
X-W3C-Hub-Spam-Status: No, score=-4.2
X-W3C-Hub-Spam-Report: AWL=2.351, BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001, W3C_AA=-1, W3C_DB=-1, W3C_IRA=-1, W3C_WL=-1
X-W3C-Scan-Sig: titan.w3.org 1hM5XJ-0001Wp-RN a3d43bc52ac5aeff5b045bc1274a0ac0
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Empty lists in Structured Headers (#781)
Archived-At: <https://www.w3.org/mid/f81f2f91-b434-5957-56ad-392ab772c47c@gmx.de>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/36579
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 02.05.2019 08:28, Mark Nottingham wrote:
> On 2 May 2019, at 4:24 pm, Julian Reschke <julian.reschke@gmx.de> wrote:
>>
>> In
>> <https://greenbytes.de/tech/webdav/draft-ietf-httpbis-header-structure-10.html#specify>,
>> we currently say:
>>
>> "Specify the header field’s allowed syntax for values, in terms of the
>> types described in Section 3, along with their associated semantics.
>> Syntax definitions are encouraged to use the ABNF rules beginning with
>> “sh-“ defined in this specification."
>>
>> Does this mean, that a definition like
>>
>>   MyField = [ sh-list ]
>>
>> is an acceptable use of the syntax? (see
>> <https://github.com/httpwg/http-extensions/issues/781#issue-426418064>).
>
> I think it's a *possible* use of the syntax; however, you'd need to accompany it with some prose that directed the parser what to do when SH parsing fails on an empty value. SH pretty strongly steers people away form doing that, so if by "acceptable" you mean "recommended", I think no.
> ...

The simplest possible processing model likely would be to parse as
sh-list, and then, upon failure, to inspect the value (after stripping
whitespace it should be empty or only contain commas).

> Happy to clarify the text you quote above to make that more clear (we probably need to take another pass at the author recommendations anyway).
 > ...

The outcome I'd like to see is: yes, it can be used that way (with care,
see above)

Best regards, Julian