diff options
| author | 2023-03-03 22:40:37 +0100 | |
|---|---|---|
| committer | 2023-03-03 22:40:37 +0100 | |
| commit | d0306975c5acb0263816b8ef3f453bb5770d376f (patch) | |
| tree | 29f43a02b3e6a0ffa0788017917c4055a6b040f3 | |
| parent | Send to collected inboxes AFTER sending to explicit recipients. (diff) | |
| download | penes-snac2-d0306975c5acb0263816b8ef3f453bb5770d376f.tar.gz penes-snac2-d0306975c5acb0263816b8ef3f453bb5770d376f.tar.xz penes-snac2-d0306975c5acb0263816b8ef3f453bb5770d376f.zip | |
Changed the way the content-length is set.
| -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, | |||
| 134 | b_size = xs_size(body); | 134 | b_size = xs_size(body); |
| 135 | 135 | ||
| 136 | /* add the content-length header */ | 136 | /* add the content-length header */ |
| 137 | char tmp[32]; | 137 | curl_easy_setopt(curl, CURLOPT_INFILESIZE, b_size); |
| 138 | sprintf(tmp, "content-length: %d", b_size); | ||
| 139 | list = curl_slist_append(list, tmp); | ||
| 140 | 138 | ||
| 141 | pd.data = (char *)body; | 139 | pd.data = (char *)body; |
| 142 | pd.size = b_size; | 140 | pd.size = b_size; |