mirror of
https://github.com/Sude-/lgogdownloader.git
synced 2025-02-08 16:33:22 +01:00
Fix cookies getting overwritten
Sometimes curl handles in downloader and galaxy api class could overwrite cookies with blank cookies Fixed this by not setting CURLOPT_COOKIEJAR by default and only using it for curl handles in website class
This commit is contained in:
parent
12281317aa
commit
a81d63b375
@ -406,7 +406,7 @@ int Util::replaceAllString(std::string& str, const std::string& to_replace, cons
|
||||
|
||||
pos = str.find(to_replace, pos + to_replace.length());
|
||||
} while(pos != std::string::npos);
|
||||
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -772,7 +772,6 @@ void Util::CurlHandleSetDefaultOptions(CURL* curlhandle, const CurlConfig& conf)
|
||||
curl_easy_setopt(curlhandle, CURLOPT_CONNECTTIMEOUT, conf.iTimeout);
|
||||
curl_easy_setopt(curlhandle, CURLOPT_FAILONERROR, true);
|
||||
curl_easy_setopt(curlhandle, CURLOPT_COOKIEFILE, conf.sCookiePath.c_str());
|
||||
curl_easy_setopt(curlhandle, CURLOPT_COOKIEJAR, conf.sCookiePath.c_str());
|
||||
curl_easy_setopt(curlhandle, CURLOPT_SSL_VERIFYPEER, conf.bVerifyPeer);
|
||||
curl_easy_setopt(curlhandle, CURLOPT_VERBOSE, conf.bVerbose);
|
||||
curl_easy_setopt(curlhandle, CURLOPT_MAX_RECV_SPEED_LARGE, conf.iDownloadRate);
|
||||
|
@ -21,6 +21,7 @@ Website::Website()
|
||||
|
||||
curlhandle = curl_easy_init();
|
||||
Util::CurlHandleSetDefaultOptions(curlhandle, Globals::globalConfig.curlConf);
|
||||
curl_easy_setopt(curlhandle, CURLOPT_COOKIEJAR, Globals::globalConfig.curlConf.sCookiePath.c_str());
|
||||
}
|
||||
|
||||
Website::~Website()
|
||||
|
Loading…
x
Reference in New Issue
Block a user