summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Services/UpdateService.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2017-06-23 20:33:44 +0100
committersr55 <[email protected]>2017-06-23 20:34:00 +0100
commit2128977388d9003a8bb191b2c0c481d5e5083601 (patch)
tree1352e72aa137c034d1a70522e212abede05c0a28 /win/CS/HandBrakeWPF/Services/UpdateService.cs
parentbe794bdcaa7c899a7b42251bc1ad34fbbdb8b992 (diff)
WinGui: Add a user agent for the HttpRequest on the update checker so we can identify the WinGui version that's checking for updates.
Diffstat (limited to 'win/CS/HandBrakeWPF/Services/UpdateService.cs')
-rw-r--r--win/CS/HandBrakeWPF/Services/UpdateService.cs2
1 files changed, 2 insertions, 0 deletions
diff --git a/win/CS/HandBrakeWPF/Services/UpdateService.cs b/win/CS/HandBrakeWPF/Services/UpdateService.cs
index 362df2e33..3b3d09125 100644
--- a/win/CS/HandBrakeWPF/Services/UpdateService.cs
+++ b/win/CS/HandBrakeWPF/Services/UpdateService.cs
@@ -108,6 +108,7 @@ namespace HandBrakeWPF.Services
// Fetch the Appcast from our server.
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.AllowAutoRedirect = false; // We will never do this.
+ request.UserAgent = string.Format("HandBrake Win Upd {0}", VersionHelper.GetVersionShort());
WebResponse response = request.GetResponse();
// Parse the data with the AppcastReader
@@ -180,6 +181,7 @@ namespace HandBrakeWPF.Services
HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(url);
webRequest.Credentials = CredentialCache.DefaultCredentials;
+ webRequest.UserAgent = string.Format("HandBrake Win Upd {0}", VersionHelper.GetVersionShort());
HttpWebResponse webResponse = (HttpWebResponse)webRequest.GetResponse();
long fileSize = webResponse.ContentLength;