mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-22 13:25:04 +00:00
Backport from xs.
This commit is contained in:
parent
e187302ae7
commit
1b22dbb5df
2 changed files with 2 additions and 2 deletions
|
@ -127,7 +127,7 @@ xs_dict *xs_http_request(const char *method, const char *url,
|
||||||
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, _data_callback);
|
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, _data_callback);
|
||||||
|
|
||||||
if (strcmp(method, "POST") == 0 || strcmp(method, "PUT") == 0) {
|
if (strcmp(method, "POST") == 0 || strcmp(method, "PUT") == 0) {
|
||||||
curl_easy_setopt(curl, method[1] == 'O' ? CURLOPT_POST : CURLOPT_PUT, 1L);
|
curl_easy_setopt(curl, method[1] == 'O' ? CURLOPT_POST : CURLOPT_UPLOAD, 1L);
|
||||||
|
|
||||||
if (body != NULL) {
|
if (body != NULL) {
|
||||||
if (b_size <= 0)
|
if (b_size <= 0)
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
/* a261bec376598d97dc10eb19f4ecb765333d071b */
|
/* a4c157da387d94c849d85371ab7773b5f1446dc1 */
|
||||||
|
|
Loading…
Reference in a new issue