Re: [core] What do coap URIs mean

Carsten Bormann <cabocabo@gmail.com> Sun, 08 December 2019 05:22 UTC

Return-Path: <cabocabo@gmail.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 4C03212003F for <core@ietfa.amsl.com>; Sat, 7 Dec 2019 21:22:39 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.998
X-Spam-Level:
X-Spam-Status: No, score=-1.998 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.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 gAf_98NuWopE for <core@ietfa.amsl.com>; Sat, 7 Dec 2019 21:22:38 -0800 (PST)
Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) (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 C3696120033 for <core@ietf.org>; Sat, 7 Dec 2019 21:22:37 -0800 (PST)
Received: by mail-wr1-x434.google.com with SMTP id t2so12328189wrr.1 for <core@ietf.org>; Sat, 07 Dec 2019 21:22:37 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=lXcgTNVE4IGte3fu12754M3+AZC0NTWotznElPmMpJc=; b=u965d0l10CZI3oO60kFx/sNcEGDeoe7Q1RA4zZxj7Bp2+dSrzV2qXp3JBeRz20gk/V EtApDMuejc9oUH+jluJXfLcK0SXMYwXkZBMGCsssNseIQnaDZuA9f+H11aHgBOodYowT gUvHnEuBLGDmSb0zmlDGwukolbzQ5KbCWMZU+GrzFvLiVKNav6dMm+385apF/3+AbxAa JLxuTX9M1f9z/UtKnXYZXzCkhx9Y6wcIgQ69EroN2BF2b/r95Xr1QsCHX6aRqa6nw2JS Rh9T/0k0Fd8WuKTN4hmUXAyHyq8uMEVvJjw4YWhcU7KjUL51++PhVnvXevPvfmQxjT4U 374w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=lXcgTNVE4IGte3fu12754M3+AZC0NTWotznElPmMpJc=; b=UKI1AG8cJB7/iPMg6ZD4J3CJkymtk+ulhRPX3it8OJJrYKPeg2WA+VJO1TT21HEHPX Xo11ltn1S+f8IXrHn5tuT0UABzPhshvCEJgZfML+4Ct8nAh8upU46FB53UOOL5K8r3ii rcsc5AiKfLyrw2gPqdenjY2Dcgi0GPDToXAB7T05xvZGbN3aacg95duoHYrU25xzOR9o Yh+dt1RqIrekt9msbzezcCo+pHL3nB0X0Oijj+1Tz3ERCHv8+ubr2fBBwqa4R3jnNLHW P+bke5NmsQoD35qStqMwL8PtzAFNYW1/qwVB6pnTteAunJjaGLPNds7cLQrB2OHcnkEa K4/w==
X-Gm-Message-State: APjAAAU1jLhP1LozsSETl5bMkcRLtGsL9bICDRRQz2Bc/7b0fv7HBTtW gzHJC7MgqcJakDgeh9pnQS8=
X-Google-Smtp-Source: APXvYqzCrTWwKsrnPrWTivfVk5LP5r+ZjrkdN8g3+fHS6y09I+tqqlT6jrup8gGPe3nNDHXYpBlARg==
X-Received: by 2002:adf:f1d0:: with SMTP id z16mr23196655wro.209.1575782556367; Sat, 07 Dec 2019 21:22:36 -0800 (PST)
Received: from [192.168.217.116] (p548DC893.dip0.t-ipconnect.de. [84.141.200.147]) by smtp.gmail.com with ESMTPSA id x10sm22176859wrp.58.2019.12.07.21.22.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 07 Dec 2019 21:22:35 -0800 (PST)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\))
From: Carsten Bormann <cabocabo@gmail.com>
In-Reply-To: <039101d5ad84$c3d656b0$4b830410$@augustcellars.com>
Date: Sun, 08 Dec 2019 06:22:33 +0100
Cc: Klaus Hartke <klaus.hartke@ericsson.com>, core@ietf.org
X-Mao-Original-Outgoing-Id: 597475260.4179929-cf846cf739a4a09dbc39687e555144a5
Content-Transfer-Encoding: quoted-printable
Message-Id: <705B42F8-5078-4F9E-931E-9ED20729106C@gmail.com>
References: <039101d5ad84$c3d656b0$4b830410$@augustcellars.com>
To: Jim Schaad <ietf@augustcellars.com>
X-Mailer: Apple Mail (2.3445.9.1)
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/Q5lGFhNZSOZN9AJ5cBkUqhTV4Yk>
Subject: Re: [core] What do coap URIs mean
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: Sun, 08 Dec 2019 05:22:39 -0000

Hi Jim,

On Dec 8, 2019, at 06:02, Jim Schaad <ietf@augustcellars.com> wrote:
> 
> I have been playing with the HREF and CoRAL documents and ended up with a
> question that I have no idea what the answer is.
> 
> coap://host.example/a/b/c
> 
> This URI represents a resource on the server that you can send a set of
> verbs to.  Given that I represent resources in my implementation as a tree,
> this is an easy thing to describe and find.
> 
> coap://host.example/a//b/c
> 
> This URI is a bit strange, but again I can build this tree and be happy with
> receiving a verb addressed to that path.  It is also something that appears
> to be totally legal based on the URI -> CoAP options algorithm.
> 
> coap://host.example/a/b/c/
> 
> I don't know what this URI represents.  Is this supposed to go to the same
> location as the first example above,

No.

> or is it supposed to go to a resource
> with an empty name under c in my tree?

This.

Many HTTP Web servers handle the fact that (1) and (3) are different by redirecting to the one that is intended.  

There is one little problem lurking here in that

   coap://host.example

and 

   coap://host.example/

are supposed to be the same thing (see also 6.2.3 and 6.2.4 of 3986 for more of this).

Grüße, Carsten