fix(http): Pass char* as CURLOPT_USERAGENT
This commit is contained in:
parent
6f882ba3b2
commit
100632cce3
@ -14,7 +14,7 @@ http_downloader::http_downloader(int connection_timeout) {
|
|||||||
curl_easy_setopt(m_curl, CURLOPT_CONNECTTIMEOUT, connection_timeout);
|
curl_easy_setopt(m_curl, CURLOPT_CONNECTTIMEOUT, connection_timeout);
|
||||||
curl_easy_setopt(m_curl, CURLOPT_FOLLOWLOCATION, true);
|
curl_easy_setopt(m_curl, CURLOPT_FOLLOWLOCATION, true);
|
||||||
curl_easy_setopt(m_curl, CURLOPT_NOSIGNAL, true);
|
curl_easy_setopt(m_curl, CURLOPT_NOSIGNAL, true);
|
||||||
curl_easy_setopt(m_curl, CURLOPT_USERAGENT, "polybar/" + string{APP_VERSION});
|
curl_easy_setopt(m_curl, CURLOPT_USERAGENT, ("polybar/" + string{APP_VERSION}).c_str());
|
||||||
curl_easy_setopt(m_curl, CURLOPT_WRITEFUNCTION, http_downloader::write);
|
curl_easy_setopt(m_curl, CURLOPT_WRITEFUNCTION, http_downloader::write);
|
||||||
curl_easy_setopt(m_curl, CURLOPT_FORBID_REUSE, true);
|
curl_easy_setopt(m_curl, CURLOPT_FORBID_REUSE, true);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user