From 100632cce36e4abadf5931437ea2dc1ea25f8e5b Mon Sep 17 00:00:00 2001 From: patrick96 Date: Mon, 28 Oct 2019 01:56:21 +0100 Subject: [PATCH] fix(http): Pass char* as CURLOPT_USERAGENT --- src/utils/http.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/http.cpp b/src/utils/http.cpp index ee595435..99aa0c4c 100644 --- a/src/utils/http.cpp +++ b/src/utils/http.cpp @@ -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_FOLLOWLOCATION, 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_FORBID_REUSE, true); }