diff --git a/src/util.cpp b/src/util.cpp index 948cda6..889eb8b 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -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); diff --git a/src/website.cpp b/src/website.cpp index b86da73..2ef126f 100644 --- a/src/website.cpp +++ b/src/website.cpp @@ -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()