Re: [T2TRG] draft-hartke-t2trg-ciri-00 review

Klaus Hartke <hartke@projectcool.de> Wed, 23 January 2019 18:49 UTC

Return-Path: <hartke@projectcool.de>
X-Original-To: t2trg@ietfa.amsl.com
Delivered-To: t2trg@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 757E11277BB for <t2trg@ietfa.amsl.com>; Wed, 23 Jan 2019 10:49:32 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, SPF_FAIL=0.001] autolearn=no 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 YVtYlFt65t4q for <t2trg@ietfa.amsl.com>; Wed, 23 Jan 2019 10:49:30 -0800 (PST)
Received: from wp382.webpack.hosteurope.de (wp382.webpack.hosteurope.de [IPv6:2a01:488:42:1000:50ed:8597::]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id CA6B11310B9 for <T2TRG@irtf.org>; Wed, 23 Jan 2019 09:57:48 -0800 (PST)
Received: from mail-qt1-f177.google.com ([209.85.160.177]); authenticated by wp382.webpack.hosteurope.de running ExIM with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) id 1gmMmY-0004Td-CQ; Wed, 23 Jan 2019 18:57:46 +0100
Received: by mail-qt1-f177.google.com with SMTP id u47so3393650qtj.6 for <T2TRG@irtf.org>; Wed, 23 Jan 2019 09:57:46 -0800 (PST)
X-Gm-Message-State: AJcUukef8P0LpWo4wp3x9r5YqhgUCCRw14xVWqCNJAjzFu/Ob+0K3TAY FzA/y9hOtik28CudSv4jeXHRX1G5apx14dhJ5Sk=
X-Google-Smtp-Source: ALg8bN7wdlgWWJYTCCiKgsbd6Opv9q5SsBUsmf063dne/GAoIzZY5Rx42X/fifrGA2sDDRgVGMtgrW9iS6khTnDRnnc=
X-Received: by 2002:ac8:2eb8:: with SMTP id h53mr3359792qta.18.1548266265347; Wed, 23 Jan 2019 09:57:45 -0800 (PST)
MIME-Version: 1.0
References: <58aa0ae4-b3fe-abf7-9bda-4908ef0b3fd7@ericsson.com> <CAAzbHvZ4FyKErmS8i6_bWPgvXUoZbc+ZX28n1WsMa1tWGbvkzg@mail.gmail.com> <52465A18-0B76-4F75-AB83-69699BB7F366@ericsson.com>
In-Reply-To: <52465A18-0B76-4F75-AB83-69699BB7F366@ericsson.com>
From: Klaus Hartke <hartke@projectcool.de>
Date: Wed, 23 Jan 2019 18:57:09 +0100
X-Gmail-Original-Message-ID: <CAAzbHvZuG9_uLw-a=A6LehT4oJu4Mt43d3UKJ0XZTC9usrktVg@mail.gmail.com>
Message-ID: <CAAzbHvZuG9_uLw-a=A6LehT4oJu4Mt43d3UKJ0XZTC9usrktVg@mail.gmail.com>
To: Ari Keränen <ari.keranen@ericsson.com>
Cc: "draft-hartke-t2trg-ciri@ietf.org" <draft-hartke-t2trg-ciri@ietf.org>, "T2TRG@irtf.org" <T2TRG@irtf.org>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-bounce-key: webpack.hosteurope.de; hartke@projectcool.de; 1548266268; fa8eccb7;
X-HE-SMSGID: 1gmMmY-0004Td-CQ
Archived-At: <https://mailarchive.ietf.org/arch/msg/t2trg/OgVjWRFEtNzzPfImOLB-6S3TU3Q>
Subject: Re: [T2TRG] draft-hartke-t2trg-ciri-00 review
X-BeenThere: t2trg@irtf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: IRTF Thing-to-Thing Research Group <t2trg.irtf.org>
List-Unsubscribe: <https://www.irtf.org/mailman/options/t2trg>, <mailto:t2trg-request@irtf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/t2trg/>
List-Post: <mailto:t2trg@irtf.org>
List-Help: <mailto:t2trg-request@irtf.org?subject=help>
List-Subscribe: <https://www.irtf.org/mailman/listinfo/t2trg>, <mailto:t2trg-request@irtf.org?subject=subscribe>
X-List-Received-Date: Wed, 23 Jan 2019 18:49:33 -0000

Ari Keränen wrote:
> > So, at the cost of two bytes in a CIRI with a default port, we gain
> > that we can compare any supported CIRI even when the scheme is
> > unrecognized. Is it worth it? In my opinion, yes - if we want to be
> > able to compare CIRIs. On that, I don't have a good opinion yet. What
> > do you think?
>
> Seems like a sensible design choice. But since it's non-obvious, should it be mentioned somewhere in the document?

Yes. The section on comparisons is currently missing, mostly because
I'm not sure if we actually need to be able to compare. If not, we
could also support URI schemes with different normalization rules. So,
as mentioned in [1], it would be nice to have a discussion on what URI
schemes we want to support and whether comparisons are actually
needed.

> >> Isn't "text" too permissive type for most (all?) of the components?
> >
> > RFC 3986 actually makes no restrictions at all on what characters can
> > be used in registered names, paths segments, queries and fragment
> > identifiers. (The only requirement is that some of them need to be
> > percent-encoded.) So, as I understand it, "text" (a.k.a. "tstr") is
> > the right match here.
>
> Does this mean also control characters like new-line are OK, or is there need for restricting that? Should we express the need for percent-encoding in CDDL?

I don't see anything in RFC 3986 that would prevent percent-encoded
control characters e.g. in a path segment:
<http://example.com/First%20Line%0D%0ASecond%20Line/>.

Since in CBOR text strings are prefixed by their length, we don't need
to do any percent encoding there:
[1, "http", 2, "example.com", 4, 80, 6, "First Line\r\nSecond Line", 6, ""]
(in CBOR diagnostic notation).

Klaus

[1] https://mailarchive.ietf.org/arch/msg/core/ITSAbkgxMhlgzwn-20Jtk6mfN04