Fixed: UserAgent Parsing

Fixes #448

New - add user agent parser tests
This commit is contained in:
bakerboy448
2021-08-22 10:40:24 -05:00
parent ab7bc85368
commit f4cee1d5f4
2 changed files with 25 additions and 1 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ namespace NzbDrone.Common.Http
{
public static class UserAgentParser
{
private static readonly Regex AppSourceRegex = new Regex(@"(?<agent>.*)\/.*(\(.*\))?",
private static readonly Regex AppSourceRegex = new Regex(@"(?<agent>[a-z0-9]*)\/.*(?:\(.*\))?",
RegexOptions.IgnoreCase | RegexOptions.Compiled);
public static string SimplifyUserAgent(string userAgent)