comp-manager: add comment to explain query can't b consist of BASE64 format
authorsaerome.kim <saerome.kim@samsung.com>
Tue, 30 Jan 2018 01:13:52 +0000 (10:13 +0900)
committersaerome.kim <saerome.kim@samsung.com>
Mon, 2 Jul 2018 10:38:47 +0000 (19:38 +0900)
Signed-off-by: saerome.kim <saerome.kim@samsung.com>
src/companion-manager/src/comp_iot.c

index 44f82e89444ef4a4048a4c7c3f4752fe193b8ac5..d3f4b8d83c38709ff6c6952ab0acd5ebb6445684 100644 (file)
@@ -151,7 +151,13 @@ static void _request_handler(iotcon_resource_h resource, iotcon_request_h reques
                                LOG_DEBUG("Receive Data");
 
                                iotcon_query_lookup(query, "data", &data);
-                               payload_len = strlen(data);
+                               /*
+                                 * BASE64 encoding/decoding system use '=' as padding byte
+                                 * But, query parameter does not allow use '=' character.Basically,
+                                 * So, in order to use BASE64 as query parameters, we need additioinal length param
+                                 * such as 'len=xx'
+                                 */
+                               payload_len = strlen(data); /* This data may be cliped the last padding 1~2 bytes ('='/'==') */
 
                                LOG_DEBUG("data = %s payload_len = %d", data, payload_len);