From 6e0e45aab7f5d99d8dea5af208925d8818cf6fef Mon Sep 17 00:00:00 2001 From: Olof hagsand Date: Fri, 20 Aug 2021 15:41:40 +0200 Subject: [PATCH] * Fixed: Some native restconf error messages did not end with \r\n. * Specifically the error when sending http request on https. --- apps/restconf/restconf_main_native.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/restconf/restconf_main_native.c b/apps/restconf/restconf_main_native.c index 80a5a7a8..a29d2373 100644 --- a/apps/restconf/restconf_main_native.c +++ b/apps/restconf/restconf_main_native.c @@ -647,7 +647,7 @@ send_badrequest(clicon_handle h, cprintf(cb, "HTTP/1.1 400 Bad Request\r\nConnection: close\r\n"); if (body){ cprintf(cb, "Content-Type: %s\r\n", media); - cprintf(cb, "Content-Length: %zu\r\n", strlen(body)); + cprintf(cb, "Content-Length: %zu\r\n", strlen(body)+2); /* for \r\n */ } else cprintf(cb, "Content-Length: 0\r\n");