Use a user agent string

This commit is contained in:
x3 2023-10-08 15:22:30 +02:00
parent 15b1f3421d
commit 9ef53163e8
Signed by: x3
GPG Key ID: 7E9961E8AD0E240E
1 changed files with 1 additions and 0 deletions

View File

@ -245,6 +245,7 @@ int metainfo_read_http(const char* url, char** out_contents, int* out_size) {
ioctl(0, TIOCGWINSZ, &h_meta.progress.wsize);
curl_easy_setopt(curl, CURLOPT_USERAGENT, "curl/8.1.2");
curl_easy_setopt(curl, CURLOPT_HEADERDATA, &h_meta);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &h_meta);
curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, metainfo_read_http_headercb);