Re: Empty lists in Structured Headers (#781)

Kari Hurtta <hurtta-ietf@elmme-mailer.org> Wed, 22 May 2019 12:32 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 3287612004D for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 22 May 2019 05:32:10 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.9
X-Spam-Level:
X-Spam-Status: No, score=-2.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.001, MAILING_LIST_MULTI=-1, SPF_PASS=-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 ODoW2imivVHP for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 22 May 2019 05:32:08 -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 141EC120021 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Wed, 22 May 2019 05:32:07 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.89) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1hTQNK-0001ci-IG for ietf-http-wg-dist@listhub.w3.org; Wed, 22 May 2019 12:29:42 +0000
Resent-Date: Wed, 22 May 2019 12:29:42 +0000
Resent-Message-Id: <E1hTQNK-0001ci-IG@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 <khurtta@welho.com>) id 1hTQNG-0001bw-Ss for ietf-http-wg@listhub.w3.org; Wed, 22 May 2019 12:29:38 +0000
Received: from welho-filter1.welho.com ([83.102.41.23]) by titan.w3.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from <khurtta@welho.com>) id 1hTQNF-00048T-4I for ietf-http-wg@w3.org; Wed, 22 May 2019 12:29:38 +0000
Received: from localhost (localhost [127.0.0.1]) by welho-filter1.welho.com (Postfix) with ESMTP id 16851159D2; Wed, 22 May 2019 15:29:13 +0300 (EEST)
X-Virus-Scanned: Debian amavisd-new at pp.htv.fi
Received: from welho-smtp1.welho.com ([IPv6:::ffff:83.102.41.84]) by localhost (welho-filter1.welho.com [::ffff:83.102.41.23]) (amavisd-new, port 10024) with ESMTP id TpuoVuFlY7Wc; Wed, 22 May 2019 15:29:12 +0300 (EEST)
Received: from kasvihuone.keh.iki.fi (89-27-39-95.bb.dnainternet.fi [89.27.39.95]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by welho-smtp1.welho.com (Postfix) with ESMTPS id F3C6B7A; Wed, 22 May 2019 15:29:01 +0300 (EEST)
In-Reply-To: <B3BF258C-ECB2-4F07-83EF-2D491E236718@apple.com>
References: <B3BF258C-ECB2-4F07-83EF-2D491E236718@apple.com>
To: HTTP Working Group <ietf-http-wg@w3.org>
Date: Wed, 22 May 2019 15:29:01 +0300
From: Kari Hurtta <hurtta-ietf@elmme-mailer.org>
CC: Tommy Pauly <tpauly@apple.com>, Poul-Henning Kamp <phk@phk.freebsd.dk>, Mark Nottingham <mnot@mnot.net>, Kari Hurtta <hurtta-ietf@elmme-mailer.org>
X-Mailer: ELM [version ME+ 2.5 PLalpha49+]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="US-ASCII"
Message-Id: <20190522122913.16851159D2@welho-filter1.welho.com>
Received-SPF: none client-ip=83.102.41.23; envelope-from=khurtta@welho.com; helo=welho-filter1.welho.com
X-W3C-Hub-Spam-Status: No, score=-4.6
X-W3C-Hub-Spam-Report: AWL=0.988, BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_NONE=0.001, W3C_AA=-1, W3C_IRA=-1, W3C_WL=-1
X-W3C-Scan-Sig: titan.w3.org 1hTQNF-00048T-4I a71da06d6ab67294d57da2341d378752
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Empty lists in Structured Headers (#781)
Archived-At: <https://www.w3.org/mid/20190522122913.16851159D2@welho-filter1.welho.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/36666
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>

> A. Leave the document as is, not defining empty header values for SH
>    (as requested by the editors). As noted on the list, this can allow
>    future revisions to add support.
> B. Define empty header values for SH (as the issue requests).
> C. Do not allow empty header values for SH, but add formal text to the
>   document explaining how to handle empty values.

I can't select any of these.


I think that empty
   sh-list

and similarly
   sh-listlist
   sh-dictionary
   sh-param-list

make sense.

After all also string and binary value can be empty.

   sh-string = DQUOTE *(chr) DQUOTE
   sh-binary = "*" *(base64) "*"

so why not other types also, where some number of elements.
So zero elements looks logical.

This results empty http header field, but there is also precedents
as noted on issue.

When header is empty, parser can not determine that
is that sh-list, sh-listlist, sh-dictionary or sh-param-list
with zero elements.

If one of these are expected for given header field, then
this is not problem.

Logically empty values for
   sh-integer
   sh-float
   sh-token

does not make lot of sense.  So I not have very fan
for null token (value ?N suggested) if it apply
for sh-integer, sh-float or sh-token.

I think there on some cases there is C what is closest.

For some B is closest (allow empty header field value
when expected syntax naturally leads zero elements on 
that case). If several syntax is allowed (ie there is
alternatives), then it using specification need specify
how to process ambiguity.

/ Kari Hurtta