Subject: [core] Content-type negotiation proposal

From: Zach Shelby <[email-masked]>
Date: Thu, 23 Jun 2011 16:07:30 +0300

Hi,

Several times the WG has discussed the addition of content-type negotiation support. Carsten has written up a proposal for how this can be achieved in Section 2 of [draft-bormann-coap-misc-08]. 

Recently two SDOs have been designing the use of CoAP bindings, in ZigBee SE2 and in ETSI M2M. In both of those SDOs we have run across the need to indicate simple content-type preference in a GET request. Because both SDOs also have an HTTP binding, they have assumed the availability of negotiation. Attempts to solve the problem in other ways has been awkward. I think we'll see the same trend in other M2M designs that also support HTTP. 

Therefore I propose a ticket to add content-type preference indication to coap-07. In particular, the proposal is to add a new Elective option called "Accept". Here is text lifted from coap-misc-08:

"The CoAP Accept option would
   when included one or more times in a request, carry one or more media
   types, each of which is an acceptable media type for the client, in
   the order of preference.  If no Accept option is given, the client
   does not express a preference. The client prefers the representation returned by the
      server to be in one of the media types, but is willing to accept
      the response also if the server returns a representation in a
      different media type."

One minor side effect of this change, is that the ct= attribute of core-link-format would need to be allowed multiple times. This attribute definition should anyways be moved from core-link-format and placed in core-coap as it is CoAP specific. 

Zach

-- 
Zach Shelby, Chief Nerd, Sensinode Ltd.
http://www.sensinode.com
http://zachshelby.org  - My blog "On the Internet of Things"
http://6lowpan.net - My book "6LoWPAN: The Wireless Embedded Internet"
Mobile: +358 40 7796297

---

From: Brian Frank <[email-masked]>
Date: Fri, 24 Jun 2011 08:14:38 -0400

+1

On Thu, Jun 23, 2011 at 9:07 AM, Zach Shelby <[email-masked]> wrote:

> Hi,
>
> Several times the WG has discussed the addition of content-type negotiation
> support. Carsten has written up a proposal for how this can be achieved in
> Section 2 of [draft-bormann-coap-misc-08].
>
> Recently two SDOs have been designing the use of CoAP bindings, in ZigBee
> SE2 and in ETSI M2M. In both of those SDOs we have run across the need to
> indicate simple content-type preference in a GET request. Because both SDOs
> also have an HTTP binding, they have assumed the availability of
> negotiation. Attempts to solve the problem in other ways has been awkward. I
> think we'll see the same trend in other M2M designs that also support HTTP.
>
> Therefore I propose a ticket to add content-type preference indication to
> coap-07. In particular, the proposal is to add a new Elective option called
> "Accept". Here is text lifted from coap-misc-08:
>
> One minor side effect of this change, is that the ct= attribute of
> core-link-format would need to be allowed multiple times. This attribute
> definition should anyways be moved from core-link-format and placed in
> core-coap as it is CoAP specific.
>
> Zach
>
> --
> _______________________________________________
> core mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/core
>
>

---

From: "Angelo P. Castellani" <[email-masked]>
Date: Fri, 24 Jun 2011 15:55:49 +0200

+1

I like this proposal too.

Best,
Angelo