Re: [Gen-art] Genart last call review of draft-ietf-httpapi-link-template-02

Mark Nottingham <mnot@mnot.net> Tue, 23 May 2023 23:52 UTC

Return-Path: <mnot@mnot.net>
X-Original-To: gen-art@ietfa.amsl.com
Delivered-To: gen-art@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 6D396C14CE2F; Tue, 23 May 2023 16:52:56 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 0.713
X-Spam-Level:
X-Spam-Status: No, score=0.713 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RAZOR2_CF_RANGE_51_100=1.886, RAZOR2_CHECK=0.922, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=no autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=mnot.net header.b="MheqyIjt"; dkim=pass (2048-bit key) header.d=messagingengine.com header.b="Ag8cgFWu"
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4yT3Sl4oqrNk; Tue, 23 May 2023 16:52:51 -0700 (PDT)
Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 76ADDC15108F; Tue, 23 May 2023 16:52:51 -0700 (PDT)
Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 7265C5C00FC; Tue, 23 May 2023 19:52:50 -0400 (EDT)
Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Tue, 23 May 2023 19:52:50 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mnot.net; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm2; t= 1684885970; x=1684972370; bh=hRSYXBfZR0K3OPxTsRqixzNUvEmpwr1rHlK kLSJkoLI=; b=MheqyIjtx/mxlsdc9ENc1KUvocmaVUslxw7E+6fa+2Iv5GppcLn RiZ2QyS5gKnEyXF2fS7QsCK5WbFWpemx+tsGqbtiNBqBmBYuzBhwgEGowTW8UZU2 3zfOv1JXBI83tRWCEbydyEiVSIU1YlZXYvdfAPJD1esmGUzPYf17bXWExd73UiE0 LcYFlYUUVUO2XeHHw7EDVoCDGDtrTQFMshR+xkhcYFTWH2Q+X/Dvtv/s4Qnxb10z x4kVcIHyYHmxxnrfBgRRREbJxeaqMy3Lk1AQ4PkULnbBlKjYaoKpdxW2nSTItevW EUw2ESm1HJxPs3+Dbu4oHSy+FbiR4qdXpcQ==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1684885970; x=1684972370; bh=hRSYXBfZR0K3OPxTsRqixzNUvEmpwr1rHlK kLSJkoLI=; b=Ag8cgFWuyanK9Zjz4FJZeKGXw/3mmnHMGqBrYowTyKPpJHtx1NX daGdqMWrgB9tczh1BYCVOGqMOy26WMBh9DABtxcVDBlPV03AMfFsD49OEPpqUPyv txBo7VYumFkW4/PJU9tjf4/wXyS3o1qwCog8zDpgERa/pSI/GUvFAMZ9djlkqjIQ e+pMT/expNm1R73dsYVOEPNpklFMb8rNjiNRJZo1/17I84ELoc+S1BnhpIXkH/e8 OrqFVrA1J/kpTaacWh0liAWk3Dyoi3YX+9EaCGIlPxxZJjTN5FWLBJdxyAa1S+ZS d4kZIrIVOXoj2cnuoWQfC8+519JQfvMISmw==
X-ME-Sender: <xms:0lFtZJn7g1HI0K8RQodZoc7oRqfNO4KloYRAgA1-dAO1QMBbGMeWQw> <xme:0lFtZE2yPzAsRZEtTuqZzgZzVt5AueQonuaURUPtbMhS8jjrQpLZmlR13HxPcp-WR Yxt40W4IehCdEpjjA>
X-ME-Received: <xmr:0lFtZPpwrOGzXU-tFnxX9Q86cWX83boTI0faqUZK4vS6i5H2rz9ABt10mAuXTjsp5DXFhyEpmBgYA9xNaOQJtUeS-IT2zxOr5rQwzyB_hJ7yTNbfx8TokoUp>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeejgedgvdeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurheptggguffhjgffvefgkfhfvffosehtqhhmtdhhtddvnecuhfhrohhmpeforghr khcupfhothhtihhnghhhrghmuceomhhnohhtsehmnhhothdrnhgvtheqnecuggftrfgrth htvghrnhepgeelgeektdegueeffeevhfdvgfffhfehleehgfdttddvvdejgedvfeejtedv udelnecuffhomhgrihhnpehivghtfhdrohhrghdpmhhnohhtrdhnvghtnecuvehluhhsth gvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmhhnohhtsehmnhhothdr nhgvth
X-ME-Proxy: <xmx:0lFtZJkiSDsec66KdARsPxknSw5rnjaNxlzckOB-rdUyo_husdOH3A> <xmx:0lFtZH31G9xi9NKdO2JSMyPWhGWouxuYFQjVjpvhN88rFixH5nPRtw> <xmx:0lFtZItwmAzBfuAIzOKDi8DAYETofiYilKsNb9MjbSpm9GLnDjjavg> <xmx:0lFtZIw8TMz0I3XcF10KalQMFlPKB_EW7gI55BF9sN12rTrN3RjSxQ>
Feedback-ID: ie6694242:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 23 May 2023 19:52:48 -0400 (EDT)
Content-Type: text/plain; charset="us-ascii"
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.600.7\))
From: Mark Nottingham <mnot@mnot.net>
In-Reply-To: <HE1PR07MB4441359730E81FABD0A385AB93439@HE1PR07MB4441.eurprd07.prod.outlook.com>
Date: Wed, 24 May 2023 09:52:44 +1000
Cc: Christer Holmberg <christer.holmberg=40ericsson.com@dmarc.ietf.org>, "gen-art@ietf.org" <gen-art@ietf.org>, HTTP APIs Working Group <httpapi@ietf.org>, Last Call <last-call@ietf.org>
Content-Transfer-Encoding: quoted-printable
Message-Id: <913BDEE9-26F8-4391-AB57-A40D07C41EE4@mnot.net>
References: <168424064858.44084.3692769234533396629@ietfa.amsl.com> <34AA44A9-B351-4798-8920-90724F600D8D@mnot.net> <HE1PR07MB4441A4329BA51DC42C9796DE937C9@HE1PR07MB4441.eurprd07.prod.outlook.com> <C5848939-4628-4760-B1B7-ECB7105B866A@mnot.net> <HE1PR07MB4441C788DC81233E50441297937C9@HE1PR07MB4441.eurprd07.prod.outlook.com> <EE952FBC-B0A4-4818-A288-1B320B469D5E@mnot.net> <HE1PR07MB4441EFC69B1BDFED17CDFFE293439@HE1PR07MB4441.eurprd07.prod.outlook.com> <HE1PR07MB4441359730E81FABD0A385AB93439@HE1PR07MB4441.eurprd07.prod.outlook.com>
To: Christer Holmberg <christer.holmberg@ericsson.com>
X-Mailer: Apple Mail (2.3731.600.7)
Archived-At: <https://mailarchive.ietf.org/arch/msg/gen-art/YACuZtdQFirKUlsuj7PXKgEjXpM>
Subject: Re: [Gen-art] Genart last call review of draft-ietf-httpapi-link-template-02
X-BeenThere: gen-art@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: "GEN-ART: General Area Review Team" <gen-art.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/gen-art>, <mailto:gen-art-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/gen-art/>
List-Post: <mailto:gen-art@ietf.org>
List-Help: <mailto:gen-art-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/gen-art>, <mailto:gen-art-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 23 May 2023 23:52:56 -0000

The quotes in my examples weren't part of the value -- sorry for the confusion.

The point is that SF is being retrofit here -- parameters are defined by applications that may not be aware that they're being used in a context that leverages SF, so we can't assume they'll follow SF syntactic rules. Doing so would require updating RFC8288 (and potentially breaking many existing applications).

Cheers,


> On 22 May 2023, at 5:57 pm, Christer Holmberg <christer.holmberg@ericsson.com> wrote:
> 
> ...and, as the comment was about Parameters, my examples should look like:
> 
> Example-Header: X; parm="1234" // sf-string
> Example-Header: X; parm=1234 // sf-integer
> 
> Example-Header: X; parm="foo123" // sf-string
> Example-Header: X; parm=foo123 // sf-token
> 
> Example-Header: X; parm="1.2.3.4" // sf-string
> Example-Header: X; parm=1.2.3.4 // NOT a valid value, as sf-decimal only
> allows one
> dot
> 
> Example-Header: X; parm="1.2" // sf-string
> Example-Header: X; parm=1.2 // sf-decimal
> 
> Regards,
> 
> Christer
> 
> -----Original Message-----
> From: Gen-art <gen-art-bounces@ietf.org> On Behalf Of Christer Holmberg
> Sent: Monday, 22 May 2023 10.48
> To: Mark Nottingham <mnot@mnot.net>
> Cc: gen-art@ietf.org; HTTP APIs Working Group <httpapi@ietf.org>; Last Call
> <last-call@ietf.org>
> Subject: Re: [Gen-art] Genart last call review of
> draft-ietf-httpapi-link-template-02
> 
> Hi Mark,
> 
>>>> Ah. The reason is that allowing any type would require creating a
>>>> mapping of current values to SF types, and there are just too many
>>>> potential (and undocumented) values already in use to do this.
>>> 
>>> I don't think that is true. Just because the Parameter syntax allows
>>> values to be encoded sf-string, sf-token, sf-boolean etc it doesn't
>>> mean that you have to map each value (existing or new ones) to each
>>> of those encodings. If a value is defined as a String, then it has to
>>> be encoded as a sf-string.
>> 
>> Consider an implementation that wants to serialise a link relation
>> that has a 'foo' Parameter that it has no special knowledge of. If the
>> value is "bar", that's very straightforward -- it will successfully
>> serialise as a Token. However, consider the value "1.2.3.4" -- it will
>> fail parsing, because it looks like an Integer or Decimal to the
>> parser, but it isn't.
> 
> It will not look like an Integer or Decimal to the parser: if the value is
> surrounded by quotes, it is a String. Tokens, Integers and Decimal do not have
> quotes.
> 
> Example-Header: "1234"     // sf-string
> Example-Header: 1234 // sf-integer
> 
> Example-Header: "foo123" // sf-string
> Example-Header: foo123 // sf-token
> 
> Example-Header: "1.2.3.4" // sf-string
> Example-Header: 1.2.3.4 // NOT a valid value, as sf-decimal only allows one
> dot
> 
> Example-Header: "1.2" // sf-string
> Example-Header: 1.2 // sf-decimal
> 
> 
>> Of course, we could specify something like "try to parse it as a
>> Structured Value; if serialisation fails, serialise it as a String."
>> That strategy might be workable, but it creates a lot of complexity -- 
>> at runtime when you have to test the value by running code, and when
>> values are handled, because now they could come in multiple forms.
>> 
>> Always serialising as a string recognises that, from the standpoint of
>> the Link header field, the value's type is opaque.
> 
> In general, if a parser is not able to determine the encoding without
> "testing" values etc, the syntax is bad. But, in the case of structured field
> values that is not the case: the parser will always know if a value is
> sf-string, sf-integer, sf-decimal etc.
> 
> Regards,
> 
> Christer
> 
> 
> 

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