Re: Working Group Last Call: Structured Headers for HTTP

Mark Nottingham <mnot@mnot.net> Mon, 02 March 2020 04:21 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 50EFA3A0AD1 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Sun, 1 Mar 2020 20:21:18 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.75
X-Spam-Level:
X-Spam-Status: No, score=-2.75 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25, 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 (2048-bit key) header.d=mnot.net header.b=vnLl0hb1; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=qHPhDdeW
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 v1GP52KH9udM for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Sun, 1 Mar 2020 20:21:15 -0800 (PST)
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 BA83B3A0ACD for <httpbisa-archive-bis2Juki@lists.ietf.org>; Sun, 1 Mar 2020 20:21:15 -0800 (PST)
Received: from lists by lyra.w3.org with local (Exim 4.92) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1j8cWs-0001rH-GK for ietf-http-wg-dist@listhub.w3.org; Mon, 02 Mar 2020 04:18:06 +0000
Resent-Date: Mon, 02 Mar 2020 04:18:06 +0000
Resent-Message-Id: <E1j8cWs-0001rH-GK@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 <mnot@mnot.net>) id 1j8cWn-0001hb-0D for ietf-http-wg@listhub.w3.org; Mon, 02 Mar 2020 04:18:01 +0000
Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by titan.w3.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <mnot@mnot.net>) id 1j8cWk-0004uZ-SM for ietf-http-wg@w3.org; Mon, 02 Mar 2020 04:18:00 +0000
Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id D90DB222AF; Sun, 1 Mar 2020 23:17:45 -0500 (EST)
Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Sun, 01 Mar 2020 23:17:45 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mnot.net; h= content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; s=fm2; bh=C iUUcpUGcb9HxbiGUdRpPxGGQFzm7wEK+OCA0cAD6nw=; b=vnLl0hb1Rse+fPzZC 2tn51cPih8aNZNj0OuG2lLqzFQ+08XFaE2jR3hzZYy/GSeivPO/PUUlY71T3VTXa Xm6VAIE3KXtt6VqXZuHWd4+LVZXQRJ3S3ekPFIHTatZZ3dMw1JbcWq9A4RGMRir2 ZZ+7xe7MYC2JcrkevXzk2XcSuFBLDlATn7nmcMC4CT9yvimc2JIbEVVE0IuULqa+ lcP+C8Zenp6jj9drzzkEXj/w286k7KiOFwLhTGjmyIkHC0jPULyVQns3Wk2uEUHW cuMsttm7nWO0yK2JNAe7FR2Bdr6kPixqOeIEyIiXNmpo+i98H8KjcUKnwgeOAZ6d 0teXg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=CiUUcpUGcb9HxbiGUdRpPxGGQFzm7wEK+OCA0cAD6 nw=; b=qHPhDdeWk+CDQgw+LfVqJFTcD5diMr+dNJkHyJ6k1LzSKD3u302c2PggB IlzlWT/ND135MIpspUMk1CXg0iYlQpUBDvtiWzqcY8VFIqSkAK3NLYxDr+1w19+5 ubrYvxGsyZkoigYHuPf2AHu9t27W5O4gvLoy0FGwnZxLueQbPy64ZgmiwVdB/vAQ P/krvwgI0M1DbG8QS5rua4ROY5j20JhE/NqDZQf5uGrNNh4L6ircSLya30gWb6Nq aNloB9+mlOn5xvPOOQW3ozEf9DWSLb/kvIbvpf9MXPDDgTYxasXYg08xFJU9GvnV s52286r7zXbCt4OhbZHeJOG5N4HPA==
X-ME-Sender: <xms:6IhcXlxVA19ESStgDfBO4SFNVfNqsK2Ey069Q2MObuHnqGDbplUTJA>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedruddtfedgjedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurheptggguffhjgffgffkfhfvofesthhqmhdthhdtvdenucfhrhhomhepofgrrhhk ucfpohhtthhinhhghhgrmhcuoehmnhhothesmhhnohhtrdhnvghtqeenucffohhmrghinh epghhithhhuhgsrdgtohhmpdhmnhhothdrnhgvthenucfkphepudduledrudejrdduheek rddvhedunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh epmhhnohhtsehmnhhothdrnhgvth
X-ME-Proxy: <xmx:6IhcXs5QR-YpNNmDW0Q_FVGVsY4w_0vJGImJiqyNUtz2jkAft2oNaA> <xmx:6IhcXmuKOZGdeaMlM9khwFCxLwTbddHS6A8ZzfP6CXac2gfxjFVsdw> <xmx:6IhcXiD_pnzZJErJe1tPzL_rwKh8qYhgTO7iT_U42F4sBA-Wi2hh5A> <xmx:6YhcXqPE3mfqzAsoSXswsOSsrbGMXRJGmthHKqdwhXd_acJpo_JMJg>
Received: from macbook-pro.mnot.net (unknown [119.17.158.251]) by mail.messagingengine.com (Postfix) with ESMTPA id 177403280065; Sun, 1 Mar 2020 23:17:42 -0500 (EST)
Content-Type: text/plain; charset="us-ascii"
Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.60.0.2.5\))
From: Mark Nottingham <mnot@mnot.net>
In-Reply-To: <0cb3a4c7-55e3-26ad-639c-405a50fe68f7@gmx.de>
Date: Mon, 02 Mar 2020 15:17:39 +1100
Cc: Tommy Pauly <tpauly@apple.com>, HTTP Working Group <ietf-http-wg@w3.org>
Content-Transfer-Encoding: quoted-printable
Message-Id: <51DBD45E-946F-4641-9573-12BF2550B4FB@mnot.net>
References: <C295C393-9602-4D41-9071-30629605E349@apple.com> <1a733857-e621-2ace-ad9a-1e3d872acf25@gmx.de> <3B46D138-971F-4602-8E54-4EE903EA5F24@mnot.net> <5b050bce-4740-4d48-60d5-3ee5678326a9@gmx.de> <F9777B9B-2D5E-4A29-A6D4-F6273437057D@mnot.net> <25ce5f62-a7a0-d60f-bb3b-ccdfc39ab44e@gmx.de> <D8146003-4572-494F-9C9F-A45D534BAE8C@mnot.net> <0cb3a4c7-55e3-26ad-639c-405a50fe68f7@gmx.de>
To: "Julian F. Reschke" <julian.reschke@gmx.de>
X-Mailer: Apple Mail (2.3608.60.0.2.5)
Received-SPF: pass client-ip=66.111.4.26; envelope-from=mnot@mnot.net; helo=out2-smtp.messagingengine.com
X-W3C-Hub-Spam-Status: No, score=-9.8
X-W3C-Hub-Spam-Report: BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, W3C_AA=-1, W3C_DB=-1, W3C_IRA=-1, W3C_IRR=-3, W3C_WL=-1
X-W3C-Scan-Sig: titan.w3.org 1j8cWk-0004uZ-SM 11ca21a953ba169d00858d45359c5239
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Working Group Last Call: Structured Headers for HTTP
Archived-At: <https://www.w3.org/mid/51DBD45E-946F-4641-9573-12BF2550B4FB@mnot.net>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/37398
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 25 Feb 2020, at 7:06 pm, Julian Reschke <julian.reschke@gmx.de> wrote:
> 
> On 25.02.2020 07:13, Mark Nottingham wrote:
>> 
>> 
>>> On 25 Feb 2020, at 5:08 pm, Julian Reschke <julian.reschke@gmx.de> wrote:
>>> 
>>> I understand that. What trips me up is that we we have to different
>>> cases: one in which the shorter notation MUST be used, one in which it
>>> MUST NOT be used. Am I the only one who thinks that this is sub-optimal?
>>> 
>>> In a perfect world, the serialization should not depend on the context
>>> it appears in. I understand that this is a trade-off, but it would be
>>> good to see more context about how we got there, and whether
>>> alternatives were discussed.
>> 
>> If you're referring to the case of a Boolean as a Dictionary value (and it would be good if you confirmed that this is what you had in mind; if you're talking about Booleans wherever they might appear, I don't know how that would work), it was considered, but IIRC it would have required a substantially more complicated parsing algorithm, because of cases like this:
> 
> Yes.
> 
>> Example-Field: ;param=on-default-boolean
>> 
>> Parameter values are comparatively simpler, because they can't have any further substructure.
> 
> I don't quite get the example. Example-Field: ;param=on-default-boolean
>> 
>> Parameter values are comparatively simpler, because they can't have any further substructure.
> 
> I don't quite get the example. In the spec I see:
> 
>  Example-DictHeader: a=?0, b, c=?1; foo=bar
> 
> If this would be instead:
> 
>  Example-DictHeader: a=?0, b, c; foo=bar
> 
> ...what would break?

It was concern about re-working too much of the parsing algorithm. However, looking at this again, I think we could replace:

~~~
   3. Otherwise:
      1. Let value be Boolean true.
      2. Let parameters be an empty, ordered map.
      3. Let member be the tuple (value, parameters).
~~~

With:

~~~
   3. Otherwise:
      1. Let value be Boolean true.
      2. Let parameters be the result of running Parsing Parameters {{parse-param}} with input_string.
      3. Let member be the tuple (value, parameters).
~~~

I've created <https://github.com/httpwg/http-extensions/issues/1083> to track this and gather feedback.

Cheers,


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