|
@@ -123,7 +123,8 @@ bool GetRemoteFile(const char *url, std::string &str, std::string &error,
|
|
|
long *responseCode, const char *contentType,
|
|
|
std::string request_type, const char *postData,
|
|
|
std::vector<std::string> extraHeaders,
|
|
|
- std::string *signature, int timeoutSec, bool fail_on_error)
|
|
|
+ std::string *signature, int timeoutSec, bool fail_on_error,
|
|
|
+ int postDataSize)
|
|
|
{
|
|
|
vector<string> header_in_list;
|
|
|
char error_in[CURL_ERROR_SIZE];
|
|
@@ -196,6 +197,11 @@ bool GetRemoteFile(const char *url, std::string &str, std::string &error,
|
|
|
}
|
|
|
}
|
|
|
if (postData) {
|
|
|
+ if (postDataSize > 0) {
|
|
|
+ curl_easy_setopt(curl.get(),
|
|
|
+ CURLOPT_POSTFIELDSIZE,
|
|
|
+ (long)postDataSize);
|
|
|
+ }
|
|
|
curl_easy_setopt(curl.get(), CURLOPT_POSTFIELDS,
|
|
|
postData);
|
|
|
}
|