[core] Change the default path option in the href document
Jim Schaad <ietf@augustcellars.com> Tue, 10 December 2019 21:16 UTC
Return-Path: <ietf@augustcellars.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 92141120147 for <core@ietfa.amsl.com>; Tue, 10 Dec 2019 13:16:36 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham 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 h73Yslu8JJPX for <core@ietfa.amsl.com>; Tue, 10 Dec 2019 13:16:35 -0800 (PST)
Received: from mail2.augustcellars.com (augustcellars.com [50.45.239.150]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id EF81A120121 for <core@ietf.org>; Tue, 10 Dec 2019 13:16:34 -0800 (PST)
Received: from Jude (73.180.8.170) by mail2.augustcellars.com (192.168.0.56) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 10 Dec 2019 13:16:29 -0800
From: Jim Schaad <ietf@augustcellars.com>
To: core@ietf.org
Date: Tue, 10 Dec 2019 13:16:28 -0800
Message-ID: <049901d5af9f$17bc87b0$47359710$@augustcellars.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Outlook 16.0
Thread-Index: AdWvkguD1AGjrOCBQhetxYfEo40mtQ==
Content-Language: en-us
X-Originating-IP: [73.180.8.170]
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/yJTtYPm0P9E38GE3D5oPMh1tVHM>
Subject: [core] Change the default path option in the href document
X-BeenThere: core@ietf.org
X-Mailman-Version: 2.1.29
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: Tue, 10 Dec 2019 21:16:36 -0000
I would like to change the default path option value in the href document. It is currently PathOption.Relative and I would like to make it PathOption.Append. Relative is the right answer if the primary schema is going to be http. If you do a GET on the resource </CoffeePot/main.html> and get back #status open #menu -> <menu.html> #order -> <order.html> This makes complete sense. In http, CoffeePot is a directory and the files main.html, menu.html and order.html are all children of that directory. This means that a substitution of "menu.html" for "main.html" is what is expected to happen. For CoAP, you can do something similar and have the structure /CoffeePot /coffee /menu /order In this case doing a relative resolution of the target will give the correct answer. In CoAP there is not the ability to do a redirect, however for the coffee pot, if that is all it does then one can put all of the resources at the root and things are fine. However, most of the applications that I have been seeing are using a tree structure so that one would have the structure /CoffeePot /menu /order /queue Doing the GET on the resource /CoffeePot then needs to return a CoRAL document that looks like #status open #menu -> <CoffeePot/menu> #order -> <CoffeePot/order> When using CIRI, this can be simplified slightly to [ PathType, Append-Path, Path, "menu"]. If append-path because the default value for PathType, then this becomes [Path, "menu"] which is going to be the shortest possible encoding. In that case if you want the same semantics as http, you would need to encode it as [PathType, RelativePath, Path, "menu"]. I think that the major criteria that needs to go into making this change is if the default model for CoAP devices is to be flat like http or hierarchical as I believe it normally is based on the small set of things that I have looked at. Jim
- [core] Change the default path option in the href… Jim Schaad
- Re: [core] Change the default path option in the … Klaus Hartke