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