Subject: [core] What do coap URIs mean

From: Jim Schaad <[email-masked]>
Date: Sat, 7 Dec 2019 21:02:58 -0800

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, or is it supposed to go to a resource
with an empty name under c in my tree?

Jim

---

From: Carsten Bormann <[email-masked]>
Date: Sun, 8 Dec 2019 06:22:33 +0100

Hi Jim,

On Dec 8, 2019, at 06:02, Jim Schaad <[email-masked]> wrote:
> location as the first example above,

No.

> or is it supposed to go to a resource

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