mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00:00
Correct useragent in http queries
Net struct init
This commit is contained in:
parent
6f44492238
commit
8903c68460
5 changed files with 13 additions and 4 deletions
|
@ -532,7 +532,7 @@ bool GUIEngine::downloadFile(std::string url,std::string target) {
|
|||
curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
|
||||
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback);
|
||||
curl_easy_setopt(curl, CURLOPT_WRITEDATA, targetfile);
|
||||
|
||||
curl_easy_setopt(curl, CURLOPT_USERAGENT, (std::string("Minetest ")+minetest_version_hash).c_str());
|
||||
res = curl_easy_perform(curl);
|
||||
if (res != CURLE_OK) {
|
||||
errorstream << "File at url \"" << url
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue