Re: [core] [art] Artart last call review of draft-ietf-core-links-json-07

"Roy T. Fielding" <fielding@gbiv.com> Wed, 26 April 2017 21:37 UTC

Return-Path: <fielding@gbiv.com>
X-Original-To: core@ietfa.amsl.com
Delivered-To: core@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id DF49A1292CE; Wed, 26 Apr 2017 14:37:43 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.3
X-Spam-Level:
X-Spam-Status: No, score=-4.3 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-2.8, RCVD_IN_SORBS_SPAM=0.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=gbiv.com
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 SXoZCa_LWWsv; Wed, 26 Apr 2017 14:37:42 -0700 (PDT)
Received: from homiemail-a121.g.dreamhost.com (sub5.mail.dreamhost.com [208.113.200.129]) (using TLSv1.1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 4B37912709D; Wed, 26 Apr 2017 14:37:42 -0700 (PDT)
Received: from homiemail-a121.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a121.g.dreamhost.com (Postfix) with ESMTP id CB86F60001A09; Wed, 26 Apr 2017 14:37:41 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gbiv.com; h=content-type :mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; s=gbiv.com; bh=kTIV2paK+Y/7/+g0K87Ygnu4MQU=; b=BqwGNUhv3uZYNaYSBiQb63Bk6WRC NXP3WFn5IB2klpPiHQ8MQtHOugvE/9zovU3en5vfRPgEZuYx3YiDAosgh0vjO9aZ fiL0/EcM2sL520MlTYQCWTbhpfgHfyalY2lxmDtrxUYHHtLM9NkrFjpb2gEeTr3o L4Pp/6U5bd3EhHo=
Received: from [192.168.1.8] (ip68-228-71-159.oc.oc.cox.net [68.228.71.159]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: fielding@gbiv.com) by homiemail-a121.g.dreamhost.com (Postfix) with ESMTPSA id 103D360001104; Wed, 26 Apr 2017 14:37:40 -0700 (PDT)
Content-Type: text/plain; charset="us-ascii"
Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\))
From: "Roy T. Fielding" <fielding@gbiv.com>
In-Reply-To: <FEA936B1-3DCE-4376-8E0D-0C57202FF777@tzi.org>
Date: Wed, 26 Apr 2017 14:37:40 -0700
Cc: IETF <ietf@ietf.org>, Julian Reschke <julian.reschke@gmx.de>, art@ietf.org, Herbert Van de Sompel <hvdsomp@gmail.com>, "core@ietf.org WG" <core@ietf.org>, Erik Wilde <erik.wilde@dret.net>, draft-ietf-core-links-json.all@ietf.org
Content-Transfer-Encoding: quoted-printable
Message-Id: <8E2E3319-0540-441C-A2D3-2325FBE199D9@gbiv.com>
References: <149188258769.15738.17473942496982365590@ietfa.amsl.com> <A12A8CB3-F756-4790-806A-A67AA8CE1D78@tzi.org> <CAOywMHdqitw-uN09p11j2xkBK6TO8y3wjAWipK7vhqbTWp0T1w@mail.gmail.com> <a2350664-05a7-8909-4cf4-5b765e09f9e7@dret.net> <027F2C41-E498-4801-86E2-047771E10545@tzi.org> <4cd01462-2a0f-803e-df10-e68b3eed0226@dret.net> <B04F33DD-51C1-4545-AD59-2F1A3AF14FF6@tzi.org> <feee7d84-263a-49e4-d95e-09ab8526b703@dret.net> <CAOywMHfJpYB6u7BFVf10Gf=Nxk0E1h5iEvyVX5VeAW0UKQOSzQ@mail.gmail.com> <5EB045F7-09FA-4EE8-844A-5AC0E3BF5C1E@tzi.org> <f1b9f42f-559d-d146-e355-c3e2ba31cb01@gmx.de> <23DDC7F2-D46F-4C19-AEA8-C71187099414@tzi.org> <A43ECEE0-47C8-485C-A9AC-E7890B0A6AA4@gbiv.com> <26C26E7B-24E1-4982-B3D8-9991AA1CC6DF@tzi.org> <FEA936B1-3DCE-4376-8E0D-0C57202FF777@tzi.org>
To: Carsten Bormann <cabo@tzi.org>
X-Mailer: Apple Mail (2.2104)
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/8oEluy_DzNQ375xG9PBaxVcXSZM>
Subject: Re: [core] [art] Artart last call review of draft-ietf-core-links-json-07
X-BeenThere: core@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: "Constrained RESTful Environments \(CoRE\) Working Group list" <core.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/core>, <mailto:core-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/core/>
List-Post: <mailto:core@ietf.org>
List-Help: <mailto:core-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/core>, <mailto:core-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 26 Apr 2017 21:37:44 -0000

> On Apr 26, 2017, at 8:51 AM, Carsten Bormann <cabo@tzi.org> wrote:
> 
> On Apr 25, 2017, at 23:25, Carsten Bormann <cabo@tzi.org> wrote:
>> 
>> OK, let me start typing that errata report then.
> 
> Below is a draft errata report.
> 
> Is this information correct?

No.  An RFC that isn't interoperable (in this case, because it
contradicts its own normative references) is a design error.

I don't agree with the entire contents of RFC6690.  The abstract alone is
enough for me to drop it in the nearest recycling bin; the design has
nothing to do with REST (an architectural style, not an architecture).

Nevertheless, the error (a non-interoperable design error) in RFC6690 is in
section 4.1.  It is either a bad URI template (if the examples are correct)
or a bad description of how to process that template.

  /.well-known/core{?search*}

RFC6570 requires that the above template's values be pct-encoded during
expansion, so the examples given in 4.1:

  The following are examples of valid query URIs:

  o  ?href=/foo matches a link-value that is anchored at /foo

  o  ?href=/foo* matches a link-value that is anchored at a URI that
     starts with /foo

  o  ?foo=bar matches a link-value that has a target attribute named
     foo with the exact value bar

  o  ?foo=bar* matches a link-value that has a target attribute named
     foo, the value of which starts with bar, e.g., bar or barley

  o  ?foo=* matches a link-value that has a target attribute named foo

are almost all wrong.  They would have to be

  The following are examples of valid query URIs:

  o  ?href=%2Ffoo matches a link-value that is anchored at /foo

  o  ?href=%2Ffoo%2A matches a link-value that is anchored at a URI that
     starts with /foo

  o  ?foo=bar matches a link-value that has a target attribute named
     foo with the exact value bar

  o  ?foo=bar%2A matches a link-value that has a target attribute named
     foo, the value of which starts with bar, e.g., bar or barley

  o  ?foo=%2A matches a link-value that has a target attribute named foo


Alternatively, if the examples are correct, the specification needs to replace
the above URI template with a more accurate list of such templates to match
the examples:

  /.well-known/core
  /.well-known/core?href={+reference}
  /.well-known/core?anchor={+anchor}
  /.well-known/core?type={+mt}
  /.well-known/core{?rel}
  /.well-known/core{?rev}
  /.well-known/core{?hreflang}
  /.well-known/core{?media}
  /.well-known/core{?title}
  /.well-known/core{?rt}
  /.well-known/core{?if}
  /.well-known/core{?sz}
  /.well-known/core{?link-extension*}
  /.well-known/core?href={+reference}*
  /.well-known/core?anchor={+anchor}*
  /.well-known/core?type={+mt}*
  /.well-known/core{?rel}*
  /.well-known/core{?rev}*
  /.well-known/core{?hreflang}*
  /.well-known/core{?media}*
  /.well-known/core{?title}*
  /.well-known/core{?rt}*
  /.well-known/core{?if}*
  /.well-known/core{?sz}*
  /.well-known/core{?link-extension*}*

... [note that this still has an ambiguity problem for href string
    values that happen to end in "*"]

and then the text in 4.1 should be fixed as well:

Original Text:

  Value Strings are percent-decoded
  ([RFC3986], Section 2.1) before matching; similarly,

Corrected Text:

  Value Strings for the href, anchor, and type attributes (reserved templates)
  are not percent-decoded ([RFC3986], Section 2.1) before matching;
  for all other templates, Value Strings are percent-decoded only once
  before matching; note that a value which originally contained a
  percent-encoded triplet of "%20" would be encoded as "%2520" by a
  non-reserved template expansion and restored here as "%20".  Similarly,


The above would make RFC6690 consistent with its normative references.

A more sensible design would separate the response format (which is fine
as a media type) from the query syntax (which doesn't need to be limited
to link attributes anyway).

....Roy