zephyr/subsys/net
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
..
ip net: Unlink the neighbor after unref 2018-02-02 16:50:07 +02:00
lib net: lwm2m: check content-format and respond with error if not support 2018-02-05 09:05:00 +02:00
CMakeLists.txt net/ieee802154: Make RAW mode generic 2017-11-22 10:10:09 -05:00
Kconfig net: Kconfig: Don't select STDOUT_CONSOLE 2018-01-05 10:00:26 -05:00
Kconfig.hostname net: Add hostname setting to Kconfig 2017-10-17 08:36:39 -04:00
TODO Bluetooth: Kconfig: Rename CONFIG_BLUETOOTH_* to CONFIG_BT_* 2017-08-09 11:14:19 +03:00
buf.c net: buf: Add slist helpers 2017-11-06 14:20:40 +02:00
hostname.c net: Add hostname setting to Kconfig 2017-10-17 08:36:39 -04:00