From 5be3ffdd3bfd96b314509f6f03e211e309d0fef3 Mon Sep 17 00:00:00 2001 From: Xavier Del Campo Romero Date: Sat, 9 Sep 2023 02:22:00 +0200 Subject: http: Use null-terminated string for POST data application/x-www-form-urlencoded-data is (or should be) always text, so it is preferrable to define struct http_post member "data" as a null- terminated string. For applications already making this assumption, this change should now remove the need for string duplication. --- include/slweb/http.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/slweb/http.h b/include/slweb/http.h index 7f5935a..a9c9751 100644 --- a/include/slweb/http.h +++ b/include/slweb/http.h @@ -25,8 +25,8 @@ struct http_payload struct http_post { bool expect_continue; - const void *data; - size_t n, nfiles, npairs; + const char *data; + size_t nfiles, npairs; const struct http_post_pair { -- cgit v1.2.3