zephyr/subsys/net/lib
Robert Chou 54d7207e09 net: lwm2m: check content-format and respond with error if not support
Currently, we always set the content-format as "plain/text" when
it is unrecognized. This is wrong for it's possible that payload
is actually something else.

For example, we don't support JSON as incoming format right now.
But if I send a PUT request to /1/0/1 (server objectinstance/lifetime
resource) with value 3200 in JSON format: {"e":[{"n":"","v":3200}]}.
The client will still handle the request and respond with changed (2.04)
except the lifetime resource is updated incorrectly due to parsing
error.

Correct the behavior by not setting a default format and respond with
content-format-not-support error code (4.15)

Signed-off-by: Robert Chou <robert.ch.chou@acer.com>
2018-02-05 09:05:00 +02:00
..
app net: if: Handle new address type of NET_ADDR_OVERRIDABLE 2018-01-23 09:25:51 +02:00
coap crypto: config: config-coap: add CONFIG for setting max content length 2017-12-15 17:52:13 -05:00
dns net: dns: Allow to initialize DNS servers from struct sockaddr[] 2018-01-18 17:30:40 +02:00
http net: http: Fix http_prepare_and_send 2018-02-02 16:50:07 +02:00
lwm2m net: lwm2m: check content-format and respond with error if not support 2018-02-05 09:05:00 +02:00
mqtt kconfig: fix help syntax and add spaces 2017-12-13 17:43:28 -06:00
openthread subsys: net: lib: Add OpenThread platform 2018-01-29 22:42:03 -05:00
sntp kconfig: fix help syntax and add spaces 2017-12-13 17:43:28 -06:00
sockets kconfig: fix help syntax and add spaces 2017-12-13 17:43:28 -06:00
CMakeLists.txt subsys: net: lib: Add OpenThread platform 2018-01-29 22:42:03 -05:00
Kconfig net: remove zoap library 2018-01-02 09:41:24 -05:00