diff options
author | default <nobody@localhost> | 2023-03-03 22:40:37 +0100 |
---|---|---|
committer | default <nobody@localhost> | 2023-03-03 22:40:37 +0100 |
commit | d0306975c5acb0263816b8ef3f453bb5770d376f (patch) | |
tree | 29f43a02b3e6a0ffa0788017917c4055a6b040f3 /xs_curl.h | |
parent | 45f490286ac8dccb56607b0096cc8ec6878c78f6 (diff) |
Changed the way the content-length is set.
Diffstat (limited to 'xs_curl.h')
-rw-r--r-- | xs_curl.h | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -134,9 +134,7 @@ xs_dict *xs_http_request(const char *method, const char *url, b_size = xs_size(body); /* add the content-length header */ - char tmp[32]; - sprintf(tmp, "content-length: %d", b_size); - list = curl_slist_append(list, tmp); + curl_easy_setopt(curl, CURLOPT_INFILESIZE, b_size); pd.data = (char *)body; pd.size = b_size; |