aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorXavier Del Campo Romero <xavi.dcr@tutanota.com>2023-09-09 02:22:00 +0200
committerXavier Del Campo Romero <xavi.dcr@tutanota.com>2023-09-09 02:32:34 +0200
commit5be3ffdd3bfd96b314509f6f03e211e309d0fef3 (patch)
tree9ddf9be667b0d090f51bf4be6274041f23ac4731 /include
parent1790e70e6131a4dc6d8b10f479f5927e8e60eb9f (diff)
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.
Diffstat (limited to 'include')
-rw-r--r--include/slweb/http.h4
1 files changed, 2 insertions, 2 deletions
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
{