From 0c86e29c05cf54799977e2426bbc5731e1a98bfb Mon Sep 17 00:00:00 2001 From: Dirk Stolle Date: Sun, 15 Dec 2024 23:36:17 +0100 Subject: [PATCH] update curl-like User-Agent headers used by some requests Pretend we are the current version of curl which is curl 8.11.1. --- updater/software/AcrobatReader2020.cs | 2 +- updater/software/TeamSpeakClient.cs | 2 +- updater/software/WinMerge.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/updater/software/AcrobatReader2020.cs b/updater/software/AcrobatReader2020.cs index bbec22dd..06e455e4 100644 --- a/updater/software/AcrobatReader2020.cs +++ b/updater/software/AcrobatReader2020.cs @@ -115,7 +115,7 @@ public override AvailableSoftware searchForNewer() // The request hangs and times out without an User-Agent header, // so let's provide a simple curl User-Agent here. var client = new HttpClient(); - client.DefaultRequestHeaders.Add("User-Agent", "curl/8.10.1"); + client.DefaultRequestHeaders.Add("User-Agent", "curl/8.11.1"); try { var task = client.GetStringAsync("https://helpx.adobe.com/acrobat/release-note/release-notes-acrobat-reader.html"); diff --git a/updater/software/TeamSpeakClient.cs b/updater/software/TeamSpeakClient.cs index 8f005c2c..e0cdae4c 100644 --- a/updater/software/TeamSpeakClient.cs +++ b/updater/software/TeamSpeakClient.cs @@ -170,7 +170,7 @@ public override AvailableSoftware searchForNewer() { // Looks like we have to add a user agent to get a valid response. // Without user agent the server returns "403 Forbidden". - client.DefaultRequestHeaders.Add("User-Agent", "curl/8.10.1"); + client.DefaultRequestHeaders.Add("User-Agent", "curl/8.11.1"); try { var task = client.GetStringAsync("https://teamspeak.com/en/downloads/"); diff --git a/updater/software/WinMerge.cs b/updater/software/WinMerge.cs index 83d2774c..5a5bbbc9 100644 --- a/updater/software/WinMerge.cs +++ b/updater/software/WinMerge.cs @@ -118,7 +118,7 @@ public override AvailableSoftware searchForNewer() var client = new HttpClient(); // Server returns "503 Service Unavailable" when no user agent is // set, so we pretend to be curl. - client.DefaultRequestHeaders.Add("User-Agent", "curl/8.10.1"); + client.DefaultRequestHeaders.Add("User-Agent", "curl/8.11.1"); string response; try {