Re: Empty lists in Structured Headers (#781)

Matthew Kerwin <matthew@kerwin.net.au> Thu, 02 May 2019 07:36 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 303351202F9 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 2 May 2019 00:36: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, HEADER_FROM_DIFFERENT_DOMAINS=0.001, MAILING_LIST_MULTI=-1, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
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 QmwyQjxY56t2 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 2 May 2019 00:36: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 9051512027F for <httpbisa-archive-bis2Juki@lists.ietf.org>; Thu, 2 May 2019 00:36:39 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.89) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1hM6FE-0003Te-Jr for ietf-http-wg-dist@listhub.w3.org; Thu, 02 May 2019 07:35:04 +0000
Resent-Date: Thu, 02 May 2019 07:35:04 +0000
Resent-Message-Id: <E1hM6FE-0003Te-Jr@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 <phluid61@gmail.com>) id 1hM6FC-0002SN-Fw for ietf-http-wg@listhub.w3.org; Thu, 02 May 2019 07:35:02 +0000
Received: from mail-it1-f182.google.com ([209.85.166.182]) by titan.w3.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from <phluid61@gmail.com>) id 1hM6FA-0000bH-9s for ietf-http-wg@w3.org; Thu, 02 May 2019 07:35:02 +0000
Received: by mail-it1-f182.google.com with SMTP id k64so1724898itb.5 for <ietf-http-wg@w3.org>; Thu, 02 May 2019 00:34:39 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=hIkZTfGC3NWyaskJMwhg6/HU+Fe5TvV8naf66tmr5+U=; b=eiw2GyHnAUgUqmczLKMUDUPMWKqLOUmVLEiEjbBKW6yrwCaqailyackz5uHa6FqEXI 6T32f+qvwTTpnSiGNxeREzng6goWbhtfwShzZdXfcBVf9cAoxb0ysuFP57QgB5Xu9nPM GL9RuMW48J6684lvA29ue4aoGv4YD6+0M2yncHs6yZ000mPfaK8XxqgP4U4TmReF1J88 hFJXzymFttYheumhRzlwJr2RvHSRDrGtneKhA9o/2I2odK2qo0akUzjYbmte/8CIx6Pz 4RYmxTrWxvVFaxDV7U7tmr07c+jr4aHafWTuheMb68jxSFtFvdTgoD7dNNN5GnYacAcN tJrA==
X-Gm-Message-State: APjAAAU3WLjsHKC0fnLZvugHDhVlbUObg1fta/PKjuHKOdVxcoHu71sX r5vnSzHMoVJKckWo/omZbmz5cyk0Zga1j2hIvTI=
X-Google-Smtp-Source: APXvYqxwehbpwNNOFJAvIfX+8KS7AK358/hOyPVZFtExgDVyjedIyalwT7vCAg2x92dmheHc+iUGgl+UipnZR2TdCew=
X-Received: by 2002:a05:6638:94:: with SMTP id v20mr1426832jao.2.1556782479238; Thu, 02 May 2019 00:34:39 -0700 (PDT)
MIME-Version: 1.0
References: <D99820F1-D169-468E-BA31-68AA710C3CC4@mnot.net> <ba411a25-c389-3470-5cf3-8abd0779da90@gmx.de> <A9057359-EBD8-4FF9-88A7-851ACA86C2EF@mnot.net>
In-Reply-To: <A9057359-EBD8-4FF9-88A7-851ACA86C2EF@mnot.net>
From: Matthew Kerwin <matthew@kerwin.net.au>
Date: Thu, 02 May 2019 17:34:24 +1000
Message-ID: <CACweHNDbeFavL_XM-w1OQummnZs61k6s7vsfhUK23gecbFLzdw@mail.gmail.com>
To: Mark Nottingham <mnot@mnot.net>
Cc: "Julian F. Reschke" <julian.reschke@gmx.de>, "ietf-http-wg@w3.org Group" <ietf-http-wg@w3.org>, Poul-Henning Kamp <phk@phk.freebsd.dk>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Received-SPF: pass client-ip=209.85.166.182; envelope-from=phluid61@gmail.com; helo=mail-it1-f182.google.com
X-W3C-Hub-Spam-Status: No, score=-4.6
X-W3C-Hub-Spam-Report: AWL=-1.083, BAYES_00=-1.9, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FORGED_FROMDOMAIN=0.124, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, W3C_AA=-1, W3C_WL=-1
X-W3C-Scan-Sig: titan.w3.org 1hM6FA-0000bH-9s 13c1c4d0996a00f39d7a45fcaf9e75e8
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Empty lists in Structured Headers (#781)
Archived-At: <https://www.w3.org/mid/CACweHNDbeFavL_XM-w1OQummnZs61k6s7vsfhUK23gecbFLzdw@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/36583
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 Thu, 2 May 2019 at 16:38, Mark Nottingham <mnot@mnot.net> 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.
>

By that reasoning, the only "recommended" use of the syntax is
all-or-nothing.  Or rather, you oughtn't use an optional sh-foo unless
its presence is clearly signalled by something else, which you can use
to avoid invoking the generic SH parser in the first place. (Lest you
have to deal with the fallout from whatever "fail parsing" actually
does)

>
> 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).
>

Definitely warranted, I think.

Cheers
-- 
  Matthew Kerwin
  https://matthew.kerwin.net.au/