core-wg / corrclar

Corrections and Clarifications to CoRE standards
Other
0 stars 0 forks source link

Close #7: Uri-Path encoding of trailing slash #32

Closed cabo closed 2 months ago

cabo commented 2 months ago

Use text of Err4895 for a an additional note about trailing slashes in URI paths

chrysn commented 2 months ago

From interim: Let's add examples.

mrdeep1 commented 2 months ago

So is coap://path///// different from coap://path/ ?

cabo commented 2 months ago

So is coap://path///// different from coap://path/ ?

Yes, and we have to clarify this.

The only place where we suppress the empty path component is between coap://authority/ and coap://authority -- these mean the same in CoAP, and the first is the one that is reconstituted from the CoAP Options. Additional trailing slashes do always count.

mrdeep1 commented 2 months ago

OK - taking it further, coap://host/path////// and coap://host/path/ are different (which is was I meant to write in the first place - been a long day).

chrysn commented 2 months ago

So is coap://path///// different from coap://path/ ?

Yes it is -- or at least, a server may make the distinction.

A server may also not make the distinction between them, or apply other simplifications for itself (like, be case-insensitive). I'd personally recommend against doing that, because client authors who only test with a single server might miss bugs: And clients do have to make the distinction.

mrdeep1 commented 2 months ago

I don't like it as well. But need to understand potential consequences.

cabo commented 2 months ago

From interim: Let's add examples.

Do we add examples to corrclar or to the formal addition to RFC7252?

cabo commented 2 months ago

I added some examples and merged -- we can reopen the issue if it isn't completely covered yet.