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

Christer Holmberg <christer.holmberg@ericsson.com> Mon, 22 May 2023 07:57 UTC

Return-Path: <christer.holmberg@ericsson.com>
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 2BA67C151980; Mon, 22 May 2023 00:57:21 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.098
X-Spam-Level:
X-Spam-Status: No, score=-2.098 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, 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=unavailable autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=ericsson.com
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 w97XttuYsbmY; Mon, 22 May 2023 00:57:17 -0700 (PDT)
Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2061b.outbound.protection.outlook.com [IPv6:2a01:111:f400:7d00::61b]) (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 CCBEEC14CE22; Mon, 22 May 2023 00:57:16 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TMFIduWSqPhMIf0nbCieUKYilFhAqXRGRXu8k2jsB4aGLZPimcnuDyKpdChBpxodwEg4CWBd2zDVVAVzxJMg9vL6lNd9YtGErVxZUvaGoOO/l14l9LPatbhb291KMbb/xlJjyjo3TytSepQszVwSjL89zegnqtkM0+4ri6WN877EtIReqCauSdc8eeSIN0Yr0zC45bO2JxQc1cUlbgVTkMIMZS029vFd9AOD8R1sgegtr6VOwbZwKYMmQNCHeq69uIVAKKnnx+u+goD/lFxKEC/O2EaFCQMMKZO/UZ2whTZzzVgjm4WXQHc7QwFKRlnU6oltM2K4xgiXwB9ko1qNvA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=DRlFUB9iJpWcZgrXjfBQzBMrEg/7Bart8gD6FaQG1wQ=; b=IWqStLZbcbKY1sJWBd5Naj7MTdM5gEcIMmNAO4SSy43Ie8iAvohL8fH4kwoCGCCO9ayvX9oh0pdV4HFhrRnZBkUK4sFNimtTnTbpPLyuYYU6cb2Tuz3Uiao0524PoQJiMJemqI760DVB/5vL5tefa5RBZ/Qc/q7aFnhA867+ruh44X8/XUe1p+ejfWPVMeqGBlI+sDI6vL9nfV2IF0XmP2ryQ5IRudWjUsUuluVMeqneb9olXW0R0p7FbXxeUUeZyfVKvJm6JbuoJgLpk1ZqtfGdeqe7gh7Y2gdoRotZcGGlyhR3CT4GkVkVcjk6tvX0mXM0r1n8alncCaCOZmZKaw==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=ericsson.com; dmarc=pass action=none header.from=ericsson.com; dkim=pass header.d=ericsson.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericsson.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DRlFUB9iJpWcZgrXjfBQzBMrEg/7Bart8gD6FaQG1wQ=; b=gxQlsVG0A2sMUZRS8Qwk/LS0HOdIFSb7prWnaaCkPZFyNMWbZ9TCKD3ebxPEb5Iq3v7/frQI4aJ9CsJUwlr9w/fAp7Rz5s1/Y7E0qFf14/N8gj0bQuxdHHzCqefOR2/XxOSgxdwrquE/vEHeQX3QDNFrou6qEbDJ/oCm7aqYeDI=
Received: from HE1PR07MB4441.eurprd07.prod.outlook.com (2603:10a6:7:9f::27) by AS8PR07MB7573.eurprd07.prod.outlook.com (2603:10a6:20b:289::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.28; Mon, 22 May 2023 07:57:11 +0000
Received: from HE1PR07MB4441.eurprd07.prod.outlook.com ([fe80::8542:2a28:6718:b1b4]) by HE1PR07MB4441.eurprd07.prod.outlook.com ([fe80::8542:2a28:6718:b1b4%7]) with mapi id 15.20.6411.028; Mon, 22 May 2023 07:57:10 +0000
From: Christer Holmberg <christer.holmberg@ericsson.com>
To: Christer Holmberg <christer.holmberg=40ericsson.com@dmarc.ietf.org>, Mark Nottingham <mnot@mnot.net>
CC: "gen-art@ietf.org" <gen-art@ietf.org>, HTTP APIs Working Group <httpapi@ietf.org>, Last Call <last-call@ietf.org>
Thread-Topic: Genart last call review of draft-ietf-httpapi-link-template-02
Thread-Index: AQHZiYk+/vdkoSTvK0uTtDhdp6KeZa9hdyHQgAAPj4CAAGvyUIABK5WAgALMIZCAAAcE8A==
Date: Mon, 22 May 2023 07:57:10 +0000
Message-ID: <HE1PR07MB4441359730E81FABD0A385AB93439@HE1PR07MB4441.eurprd07.prod.outlook.com>
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>
In-Reply-To: <HE1PR07MB4441EFC69B1BDFED17CDFFE293439@HE1PR07MB4441.eurprd07.prod.outlook.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: yes
X-MS-TNEF-Correlator:
authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=ericsson.com;
x-ms-publictraffictype: Email
x-ms-traffictypediagnostic: HE1PR07MB4441:EE_|AS8PR07MB7573:EE_
x-ms-office365-filtering-correlation-id: 0eba9ea2-3590-406f-adc8-08db5a9a2589
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: KFH/rlAx7i9aTyLSm5cON4Umdy65e4KPiHeJIlDwNMCkHh2jMfJLGMfhO9s4ZnoJlbGYq2OYGC79F/EbG5BtNn01nOk35GEbSXhJTwuNHNH+14jaH8Eajc7A2YPy8vh0TlexThlxVBNLXPE9octN6UPTKAOAGUDesr+D5yDMFDwG1fr6LUohXc0PlqIrl8dxPUnSPZYvwxy7/MrOi1vdop9gRePTzgfOhfffUzCdQ9edwUK+Ue4u4ZsyiSDgpDaVBa3rSc2gk3zea8LPyldTUOzfCVqnzRjyVA4cNCDRw2Vr++pv2CkJcjkpN4jFkSW8VmZ1vjHw//Oeawyt4TI7PhoXD43dDptRLMTdT4fcpaY9ynmu4xrau9ykiDB9sJZxECuuZmoDpsFVJeCuliFgAbeNt9hEpHUBSlS7FjL5igr8Clj2Jt/Q9Db0M6dTZ6RthHBcSemD3YdfphdW5lerdaCnDH3LM4ziR9AvRKRSobpqlR49lLXBp3dl+rdOwuwRbNlB2unaIXG2znG5KHc/z+jvejDIGG8wiFH6ZOmZKfQ2etGV7bqfZDpWqfqaXdKjCMm9IuFQjliYVdz9Ipr489sLVVNfb0rDBmAF9VC3VAVkPJkbQMZOxMs4mF5qU+cNXx5M9pEKpyszPNiqlmyK9Fy7IclRvNQuntu/EfbB12s=
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:HE1PR07MB4441.eurprd07.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(396003)(376002)(346002)(136003)(39860400002)(366004)(451199021)(38070700005)(99936003)(122000001)(82960400001)(38100700002)(33656002)(86362001)(55016003)(2940100002)(9686003)(44832011)(52536014)(6506007)(8676002)(8936002)(2906002)(186003)(54906003)(478600001)(110136005)(64756008)(316002)(4326008)(26005)(41300700001)(71200400001)(5660300002)(66446008)(66476007)(7696005)(76116006)(66556008)(66946007)(83380400001); DIR:OUT; SFP:1101;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: 6dCpNuaJ/RJn9sRKzByTk4tTQ9EuOmCSUzfYQtMGQ+C9oyrKROgDAb8L01pe2yHjXvfUCtKqULHqgZAlb5h0S+Y6EcAjL+S6gJwHiDHov55kEofi4gmGHfoYxrD47+Ea1X/70ZnsNdr41nHouQl7qiE62WkVwvvvl7qTQgtvpD+ED5s8wob4jGAEWscAbMbkolkz4qsCD7YByHA9nRBXkssa+APHoZI6JdZbx2ePdC12+al3T9HPdNlgIZyRntNS0gtFr3QjAy11hXcQNiiY5mYlf4Qx53QgyV5A17KeEijAMkuHehexhZdcu6C4TR3BM7wj0+d0i+hrrYcsOEaYi5Z62u4RLadOA67jZ6Le0DLZyPJZ6pfsgD78byYxh9V64lxzIHX2Z+mzn4Wf5eiPEpFHOCLQC5tvr1WeGoPpkEsQ/vYLeIOVlYyonmUO3PXSkzkYhX0TAzmJezd3qSBMA8hVivAXjNYHGrKKCXKBz5xTFU1yqSLlBlf8MM+uA78UMN65NRf/UvaWD3Qh0f5FbyilgAXrleBJ0TSAEjfQAt2J/nTG/3uz1jbHSiWr1S6Q4E4w1CiGeJFihCjgnw+gUbJxN5aQlyOwCFHHW9c7/p9iyCw3c5J6sRSOJYLl3W90ntcDE//L2rlu3i0/NmCHD1vH73hg8K1c83aggv+KXEkO9wrDYRl2y1SfuZroblqJeygaCBSNCgUNEvLQo+nAkpimeR6kHAow85XndWpIkwQLa7fPWaN2f6S3PsvfCQ9y0mOzESTB5r146n/gs6hdvkERKgbAq35LCobwnUqo3a7eyJ8J+zrPAO9AbX6guyZP0wrfQojsA9gpCSau2aPZt3+MN95qfswBMBcpPNQAwB31U/XHvsGZ2iIfmNRZwrpx312IW/einKi4inB8bY7xPn/5fH8R8Do54kUCbMyb3wmBoav0p6Wo0xlJMjGX9/qLHPcRabvdzFQjJa+npcVB46Qk6M4ClKbvR1fZ1W4zWuDSqw8xskBqnsj3KpOM1CJ5+tAXnJl9/i9IlgsbtFNHnZ5de4kaBR77BnB48O7CohsHM8fan1JXy3GlKb+VlndcNCNQWsqtopzYL7ByY+qXXixpmTsxOGy1s8VptnQ2ShZ/8HtO0a6Y1H/I6IeJNqllVupp1PHcpOG1f53AGD7iS1WrsY1Syg7osFN1R22Z3vJGm9nkTvNQBoE3D+yD/huZw6to5ohnHWngzBGve/+p4Z1KFZdFvwIQBmPR7L3E+ezQ3+ZeUF+tFZ9UZYH+66ZHzCX9iBx3JiED7sG+1swaCXFfo56e21i2ziywvlfsj8+brHJRVPar4j+kMb8Lvckqgxrdp0kMbsnmVj8E6mYAvaE1R+ls97iPoG/F59bgkS2fgCqRzN/AgR8ycEbrBXZbasxr27jhZI03NQUHPDBfx38X7fYJdfZ7SIEYaekIbjtZjwOp/AWe7YDsAAKFQtHdVnqTUbZQymUmzw4coSgGo/LQGW7uyaaVZQDruUIB6yKlUfdwkW8TYk6nICuq6FjDD4vq+NJV8ap/f5vBKniqrdZ7uAtqXvXHMzXmnnQ5dKs6Q+qpaY6/BilfdCNn/g5hALWzGNxgax7dabRUIJoIAw==
Content-Type: multipart/signed; protocol="application/x-pkcs7-signature"; micalg="SHA1"; boundary="----=_NextPart_000_0077_01D98C9C.27C72650"
MIME-Version: 1.0
X-OriginatorOrg: ericsson.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: HE1PR07MB4441.eurprd07.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 0eba9ea2-3590-406f-adc8-08db5a9a2589
X-MS-Exchange-CrossTenant-originalarrivaltime: 22 May 2023 07:57:10.4106 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 92e84ceb-fbfd-47ab-be52-080c6b87953f
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: PI3d4D4LYQ4Eg71js7XkwbSM8QY6Q/dMgUuEnhL6BM37Y1Koq43vhASuNDUygmVtT9FgBZsG519KLC7rLhUM1cEUdA2XV3dqVpDE0gjihfg=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR07MB7573
Archived-At: <https://mailarchive.ietf.org/arch/msg/gen-art/HyahVwL-HDw6zTpJwvqJtFAxusE>
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: Mon, 22 May 2023 07:57:21 -0000

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