Add support for and handle presence of the coap ACCEPT option.
authorStephane Lejeune <stlejeun@cisco.com>
Thu, 10 Sep 2015 23:58:19 +0000 (01:58 +0200)
committerPatrick Lankswert <patrick.lankswert@intel.com>
Tue, 15 Sep 2015 15:26:05 +0000 (15:26 +0000)
commitc8c8efa2985f53797f5e7b1fbc3be09f95ae93f8
tree4a0eabf3fd435f602fa41fe89283d5b815f6aee9
parent00d9d4590cb78ad16752b06f80e0fea8b77b5d97
Add support for and handle presence of the coap ACCEPT option.

This commit adds the CBOR accept option to all requests.
When a request comes in with an accept option, the option is evaluated
against the supported encoding formats. If the format is undefined or
when CBOR is requested, CBOR will be used to encod the payload.
When the response does not carry a payload, the accept option is
ignored and the response will proceed irrespective whether the accept
format was supported or not. This allowsi for example a device that
performs a delet operation proceed first working out which format is
supported by the server.

Change-Id: I7ae3430d11f1481a91413088a959f105b216ffea
Signed-off-by: Stephane Lejeune <stlejeun@cisco.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/2492
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
Reviewed-by: Patrick Lankswert <patrick.lankswert@intel.com>
12 files changed:
resource/csdk/connectivity/api/cacommon.h
resource/csdk/connectivity/common/src/caremotehandler.c
resource/csdk/connectivity/inc/caprotocolmessage.h
resource/csdk/connectivity/src/caprotocolmessage.c
resource/csdk/stack/include/internal/ocobserve.h
resource/csdk/stack/include/internal/ocserverrequest.h
resource/csdk/stack/include/internal/ocstackinternal.h
resource/csdk/stack/include/octypes.h
resource/csdk/stack/src/ocobserve.c
resource/csdk/stack/src/ocresource.c
resource/csdk/stack/src/ocserverrequest.c
resource/csdk/stack/src/ocstack.c