mirror of
https://github.com/asdlokj1qpi233/subconverter.git
synced 2026-11-04 10:42:04 +00:00
Enhancements
Fix when subscription download timeout before complete, the parser will still try to parse downloaded content. Change default regex library to PCRE2. Change Quantumult X "url-test" equivalent to "available". Optimize codes. Update build scripts.
This commit is contained in:
12 files changed
+164
-133
No files matched your search
+5
-1
@@ -23,6 +23,7 @@ static int writer(char *data, size_t size, size_t nmemb, std::string *writerData
|
||||
std::string curlGet(std::string url, std::string proxy, std::string &response_headers)
|
||||
{
|
||||
CURL *curl_handle;
|
||||
CURLcode res;
|
||||
std::string data;
|
||||
|
||||
curl_global_init(CURL_GLOBAL_ALL);
|
||||
@@ -43,9 +44,12 @@ std::string curlGet(std::string url, std::string proxy, std::string &response_he
|
||||
if(proxy != "")
|
||||
curl_easy_setopt(curl_handle, CURLOPT_PROXY, proxy.data());
|
||||
|
||||
curl_easy_perform(curl_handle);
|
||||
res = curl_easy_perform(curl_handle);
|
||||
curl_easy_cleanup(curl_handle);
|
||||
|
||||
if(res != CURLE_OK)
|
||||
data.clear();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user