core-wg / corrclar

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

Every transport re-states the URI decomposing and composing rules #38

Open chrysn opened 1 month ago

chrysn commented 1 month ago

The experience doing different protocols over CoAP is that every transport re-states the rules of section 6 of RFC7252 in some way (or misses URIs completely, resulting in LwM2M using CoAP-over-SMS without having an idea of what the URIs behind it are). Those are largely copied, and put implementers in the bad place where they have to decide whether or not they are really equivalent (because such duplication in code would be frowned upon).

A restatement of CoAP rules could say that there is a single consistent rule set, and that different transports just have different default values for some options (such as Uri-Host, which may be influenced by SNI), and a different value for the scheme (which I think should just be the default value for Proxy-Scheme rather than treating this as possibly-absent).

Quite possibly, that scheme mapping could be tuples (the protocol itself, the scheme name, the ALPN value / coaptransport value) after transport-indication -- it does no harm there that the scheme name is "coap" or "coaps" for newer transports (if coaps even stays a thing).