mirror of
https://github.com/minetest/minetest.git
synced 2025-01-07 16:40:23 +01:00
parent
178943b4b7
commit
0d817ff4ff
@ -229,9 +229,8 @@ HTTPFetchOngoing::HTTPFetchOngoing(const HTTPFetchRequest &request_,
|
|||||||
oss(std::ios::binary)
|
oss(std::ios::binary)
|
||||||
{
|
{
|
||||||
curl = pool->alloc();
|
curl = pool->alloc();
|
||||||
if (curl == NULL) {
|
if (!curl)
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
// Set static cURL options
|
// Set static cURL options
|
||||||
curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1);
|
curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1);
|
||||||
@ -417,10 +416,12 @@ HTTPFetchOngoing::~HTTPFetchOngoing()
|
|||||||
// Set safe options for the reusable cURL handle
|
// Set safe options for the reusable cURL handle
|
||||||
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION,
|
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION,
|
||||||
httpfetch_discardfunction);
|
httpfetch_discardfunction);
|
||||||
curl_easy_setopt(curl, CURLOPT_WRITEDATA, NULL);
|
curl_easy_setopt(curl, CURLOPT_USERAGENT, nullptr);
|
||||||
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, NULL);
|
curl_easy_setopt(curl, CURLOPT_WRITEDATA, nullptr);
|
||||||
|
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, nullptr);
|
||||||
|
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, nullptr);
|
||||||
if (http_header) {
|
if (http_header) {
|
||||||
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, NULL);
|
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, nullptr);
|
||||||
curl_slist_free_all(http_header);
|
curl_slist_free_all(http_header);
|
||||||
}
|
}
|
||||||
if (multipart_mime) {
|
if (multipart_mime) {
|
||||||
|
Loading…
Reference in New Issue
Block a user