Subject: [core] #165: Add 4.06 error to Accept

From: Zach Shelby <[email-masked]>
Date: Mon, 24 Oct 2011 13:23:54 +0300

I made the relevant changes for this ticket. Added the 4.06 Not Acceptable error code and modified the Accept text to return this error. I am not 100% sure whether SHOULD is appropriate for both returning the preferred types and returning the 4.06, but this is consistent with RFC2616 from what I can tell. Here is the new text if anyone has comments:

5.10.5.  Accept

   The CoAP Accept option indicates when included one or more times in a
   request, one or more media types, each of which is an acceptable
   media type for the client, in the order of preference.  The
   representation format is given as a numeric media type identifier
   that is defined in the CoAP Media Type registry (Section 11.3).  If
   no Accept options are given, the client does not express a preference
   (thus no default value is assumed).  The client prefers the
   representation returned by the server to be in one of the media types
   indicated.  The server SHOULD return one of the preferred media types
   if available.  If none of the preferred media types can be returned,
   then a 4.06 "Not Acceptable" SHOULD be sent as a response.
   Note that as a server might not support the Accept option (and thus
   would ignore it as it is elective), the client needs to be prepared
   to receive a representation in a different media type.  The client
   can simply discard a representation it can not make use of.

   This option is "elective".  It MAY occur more than once.

-- 
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: "core issue tracker" <[email-masked]>
Date: Mon, 24 Oct 2011 10:28:07 -0000

#165: Add 4.06 error to Accept

Changes (by zach@…):

 * status:  new => closed
 * resolution:   => fixed

-- 
----------------------------------+---------------------
 Reporter:  zach@…                |       Owner:  zach@…
     Type:  protocol enhancement  |      Status:  closed
 Priority:  minor                 |   Milestone:
Component:  coap                  |     Version:
 Severity:  -                     |  Resolution:  fixed
 Keywords:                        |
----------------------------------+---------------------

Ticket URL: <http://trac.tools.ietf.org/wg/core/trac/ticket/165#comment:1>
core <http://tools.ietf.org/core/>