Subject: [core] draft-ietf-core-coap-09 - Content-Type critical

From: Klaus Hartke <[email-masked]>
Date: Tue, 17 Apr 2012 03:47:55 +0200

Why is the Content-Type Option critical and not elective?

Klaus

---

From: Carsten Bormann <[email-masked]>
Date: Thu, 19 Apr 2012 16:05:17 +0200

> Why is the Content-Type Option critical and not elective?

Because you can't understand (the payload and thus) the message without understanding the content-type?

The distinction is kind of moot as it is hard to imagine an implementation that does not handle content-type.

What would be good arguments to make it elective?

Grüße, Carsten

---

From: Cullen Jennings <[email-masked]>
Date: Fri, 20 Apr 2012 06:40:36 -0600

> The distinction is kind of moot as it is hard to imagine an implementation that does not handle content-type.

for what it's worth ... one of the implementation that I had access to the source code of does not do this. The CoAP stack on the server correctly parsed  the Accept option but the application ignored it and returned the same data regardless of what the client asked for. The client parsed the return value of the Content-Type then ignore it and did the same thing with the data regardless of Content-Type. 

I suspect this type of behavior is not unique - I know many HTTP clients and servers do about the same thing. 

I'm not 100% sure of what I think of this - perhaps the server and client are just broken. Perhaps it does not matter. The one thing that the server did do is correctly set the Content-Type of the returned data. Of course it set it to text/plain even thought is was only meant to be a machine readable value ad conformed to a very specific syntax.