diff --git a/winixd/utils/http.cpp b/winixd/utils/http.cpp index 407fb7e..3faf641 100644 --- a/winixd/utils/http.cpp +++ b/winixd/utils/http.cpp @@ -477,12 +477,8 @@ bool Http::fetch_internal(const char * url, const std::string * in, pt::TextStre curl_easy_setopt(curl, CURLOPT_SEEKDATA, this); curl_easy_setopt(curl, CURLOPT_POST, 1); - /* - * do not set content-leght header here - * curl uses "Expect: 100-continue" and it collides if Content-Length is set - * https://daniel.haxx.se/blog/2020/02/27/expect-tweaks-in-curl/ - * - */ + curl_off_t size = read_function_input->size(); + curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE_LARGE, size); } curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, fetch_write_function);