zephyr/subsys/net
Arvin Farahmand 6d5f3debaa net: http_client: Fix payload issue on HTTP upload
Bug fix and improved `payload` handling in `http_client_req`.

Changes to `http_client_req` behaviour:

If the user provides `payload_len` it is used to generate the
`Content-Length` header. This is done even if `payload_cb` is used to
provide the actual data. If no `payload_len` is specified then no
`Content-Length` is generated.

If `payload_cb` is provided it is called to send the payload data.
Otherwise `payload` is used as the payload buffer and sent. If
`payload_len` is not zero, it is used as the size of `payload`.
Otherwise `payload` is assumed to be a string and `strlen` is used to
determine its size. This is to maintain current behaviour and not break
existing samples.

Fixes #24431

Signed-off-by: Arvin Farahmand <arvinf@ip-logix.com>
2020-04-21 00:05:04 +03:00
..
ip net: tcp2: Avoid extra memory allocation in endpoint cmp 2020-04-19 11:10:37 +03:00
l2 net: l2: openthread: Add config option to enable OpenThread CoAP api 2020-04-17 09:21:41 +03:00
lib net: http_client: Fix payload issue on HTTP upload 2020-04-21 00:05:04 +03:00
buf.c net: buf: Remove timeout variable from debug print 2020-04-09 16:07:03 +03:00
CMakeLists.txt license: cleanup: add SPDX Apache-2.0 license identifier 2019-04-07 08:45:22 -04:00
hostname.c net: Clarify logging in networking code 2018-12-07 12:00:04 +02:00
Kconfig net: buf: Move LEGACY_TIMEOUT_API selection to specific subsystems 2020-04-03 23:17:53 +03:00
Kconfig.hostname kconfig: Clean up header comments and make them consistent 2019-11-04 17:31:27 -05:00
Kconfig.template.log_config.default.net kconfig: Clean up header comments and make them consistent 2019-11-04 17:31:27 -05:00
Kconfig.template.log_config.net kconfig: Clean up header comments and make them consistent 2019-11-04 17:31:27 -05:00