CLuaInstCurl: Fix CurlDownload() to send POST data

- Set Lua api version to 1.77
This commit is contained in:
M. Liebmann
2017-10-23 07:52:32 +02:00
parent d7922af575
commit 100fa78952
2 changed files with 4 additions and 2 deletions

View File

@@ -4,4 +4,4 @@
* to luainstance.h changes * to luainstance.h changes
*/ */
#define LUA_API_VERSION_MAJOR 1 #define LUA_API_VERSION_MAJOR 1
#define LUA_API_VERSION_MINOR 76 #define LUA_API_VERSION_MINOR 77

View File

@@ -271,8 +271,10 @@ Example:
if (!userAgent.empty()) if (!userAgent.empty())
curl_easy_setopt(curl_handle, CURLOPT_USERAGENT, userAgent.c_str()); curl_easy_setopt(curl_handle, CURLOPT_USERAGENT, userAgent.c_str());
if (!postfields.empty()) if (!postfields.empty()) {
curl_easy_setopt(curl_handle, CURLOPT_POSTFIELDSIZE, static_cast<long>(postfields.length()));
curl_easy_setopt(curl_handle, CURLOPT_POSTFIELDS, postfields.c_str()); curl_easy_setopt(curl_handle, CURLOPT_POSTFIELDS, postfields.c_str());
}
if (ipv4 && ipv6) if (ipv4 && ipv6)
curl_easy_setopt(curl_handle, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_WHATEVER); curl_easy_setopt(curl_handle, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_WHATEVER);