Subject: [core] coap-link-format

From: Michael Richardson {quigon} <[email-masked]>
Date: Tue, 06 Nov 2012 18:38:28 -0000

I have a minor editorial comment about section 3.1 about core-link-format.
It says:
  "The resource type attribute MUST NOT occur more than once in a link."

I understand specifying rules as to what is compliant and what is not.
But, given the liberal part of the Postel doctrine, I want to suggest instead one of these texts be added.
  "If more than one resource type attribute is seen, the last one is used."
or
  "If more than one resource type attribute is seen, the link description is discarded as invalid."
or
  "If more than one resource type attribute is seen, the entire file is discarded as invalid."

thanks.
-- 
Sent from my android transformer, running CM9

---

From: Carsten Bormann <[email-masked]>
Date: Wed, 7 Nov 2012 11:39:05 -0500

> I have a minor editorial comment about section 3.1 about core-link-format.

JFYI, that is now RFC 6690.

>  "The resource type attribute MUST NOT occur more than once in a link."

Actually, it says:

  "The Resource Type attribute
   MUST NOT appear more than once in a link."

The specific issue is an instance of a general protocol evolution objective that could be termed "soup avoidance".
The Postel Principle is a bit like water.
If you sprinkle too much of it on top of a protocol, that turns into soup (as in HTML).
If you put in too little, the protocol may become brittle.

>  "If more than one resource type attribute is seen, the last one is used."

That would be almost a recipe for soup.

>  "If more than one resource type attribute is seen, the entire file is discarded as invalid."

The latter alternatives are examples that I would call militant anti-soup vigilance.

Right now, I'd say, if you want a link to have a resource type, send exactly one.
Otherwise, you are deep in undefined behavior.

Grüße, Carsten