]> git.lizzy.rs Git - minetest.git/blobdiff - src/httpfetch.cpp
Copy zlib and freetype dll to windows package too
[minetest.git] / src / httpfetch.cpp
index 2eca363d7bb9a34bb415a431cc2df00ddedd8d30..69c366ee00734f0a529ab7bfb32983f28075259c 100644 (file)
@@ -45,8 +45,8 @@ HTTPFetchRequest::HTTPFetchRequest()
        caller = HTTPFETCH_DISCARD;
        request_id = 0;
        timeout = g_settings->getS32("curl_timeout");
-       connect_timeout = timeout * 5;
-       
+       connect_timeout = timeout;
+
        useragent = std::string("Minetest/") + minetest_version_hash + " (" + porting::get_sysinfo() + ")";
 }
 
@@ -259,6 +259,10 @@ struct HTTPFetchOngoing
                                        request.extra_headers[i].c_str());
                        }
                        curl_easy_setopt(curl, CURLOPT_HTTPHEADER, httpheader);
+
+                       if (!g_settings->getBool("curl_verify_cert")) {
+                               curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, false);
+                       }
                }
        }
 
@@ -302,7 +306,7 @@ struct HTTPFetchOngoing
                }
 
                if (res != CURLE_OK) {
-                       infostream<<request.url<<" not found ("
+                       errorstream<<request.url<<" not found ("
                                <<curl_easy_strerror(res)<<")"
                                <<" (response code "<<result.response_code<<")"
                                <<std::endl;
@@ -566,6 +570,8 @@ class CurlFetchThread : public JThread
                log_register_thread("CurlFetchThread");
                DSTACK(__FUNCTION_NAME);
 
+               porting::setThreadName("CurlFetchThread");
+
                CurlHandlePool pool;
 
                m_multi = curl_multi_init();