mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-21 20:09:00 -05:00
added user agent: OpenSpace, to http-request
This commit is contained in:
@@ -243,7 +243,7 @@ std::future<DownloadManager::MemoryFile> DownloadManager::fetchFile(
|
||||
|
||||
curl_easy_setopt(curl, CURLOPT_URL, url.c_str()); // NOLINT
|
||||
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); // NOLINT
|
||||
// NOLINTNEXTLINE
|
||||
curl_easy_setopt(curl, CURLOPT_USERAGENT, "OpenSpace"); // NOLINT
|
||||
curl_easy_setopt(curl, CURLOPT_WRITEDATA, reinterpret_cast<void*>(&file));
|
||||
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, writeMemoryCallback); // NOLINT
|
||||
curl_easy_setopt(curl, CURLOPT_TIMEOUT, 5L); // NOLINT
|
||||
|
||||
@@ -58,6 +58,7 @@ bool HttpRequest::perform(std::chrono::milliseconds timeout) {
|
||||
}
|
||||
|
||||
curl_easy_setopt(curl, CURLOPT_URL, _url.data());
|
||||
curl_easy_setopt(curl, CURLOPT_USERAGENT, "OpenSpace"); // NOLINT
|
||||
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
|
||||
|
||||
// The leading + in all of the lambda expressions are to cause an implicit conversion
|
||||
|
||||
Reference in New Issue
Block a user