diff --git a/src/NzbDrone.Common.Test/Http/HttpClientFixture.cs b/src/NzbDrone.Common.Test/Http/HttpClientFixture.cs index f0e84583d..23f08adbe 100644 --- a/src/NzbDrone.Common.Test/Http/HttpClientFixture.cs +++ b/src/NzbDrone.Common.Test/Http/HttpClientFixture.cs @@ -229,11 +229,6 @@ namespace NzbDrone.Common.Test.Http [Test] public void should_follow_redirects_to_https() { - if (typeof(TDispatcher) == typeof(ManagedHttpDispatcher) && PlatformInfo.IsMono) - { - Assert.Ignore("Will fail on tls1.2 via managed dispatcher, ignore."); - } - var request = new HttpRequestBuilder($"https://{_httpBinHost}/redirect-to") .AddQueryParam("url", $"https://radarr.video/") .Build(); diff --git a/src/NzbDrone.Common/Http/Dispatchers/ManagedHttpDispatcher.cs b/src/NzbDrone.Common/Http/Dispatchers/ManagedHttpDispatcher.cs index e5bcb6432..3fa5657c1 100644 --- a/src/NzbDrone.Common/Http/Dispatchers/ManagedHttpDispatcher.cs +++ b/src/NzbDrone.Common/Http/Dispatchers/ManagedHttpDispatcher.cs @@ -34,19 +34,10 @@ namespace NzbDrone.Common.Http.Dispatchers { var webRequest = (HttpWebRequest)WebRequest.Create((Uri)request.Url); - if (PlatformInfo.IsMono) - { - // On Mono GZipStream/DeflateStream leaks memory if an exception is thrown, use an intermediate buffer in that case. - webRequest.AutomaticDecompression = DecompressionMethods.None; - webRequest.Headers.Add("Accept-Encoding", "gzip"); - } - else - { - // Deflate is not a standard and could break depending on implementation. - // we should just stick with the more compatible Gzip - //http://stackoverflow.com/questions/8490718/how-to-decompress-stream-deflated-with-java-util-zip-deflater-in-net - webRequest.AutomaticDecompression = DecompressionMethods.GZip; - } + // Deflate is not a standard and could break depending on implementation. + // we should just stick with the more compatible Gzip + //http://stackoverflow.com/questions/8490718/how-to-decompress-stream-deflated-with-java-util-zip-deflater-in-net + webRequest.AutomaticDecompression = DecompressionMethods.GZip; webRequest.Method = request.Method.ToString(); webRequest.UserAgent = _userAgentBuilder.GetUserAgent(request.UseSimplifiedUserAgent); @@ -127,19 +118,6 @@ namespace NzbDrone.Common.Http.Dispatchers try { data = await responseStream.ToBytes(); - - if (PlatformInfo.IsMono && httpWebResponse.ContentEncoding == "gzip") - { - using (var compressedStream = new MemoryStream(data)) - using (var gzip = new GZipStream(compressedStream, CompressionMode.Decompress)) - using (var decompressedStream = new MemoryStream()) - { - gzip.CopyTo(decompressedStream); - data = decompressedStream.ToArray(); - } - - httpWebResponse.Headers.Remove("Content-Encoding"); - } } catch (Exception ex) { diff --git a/src/NzbDrone.Common/Instrumentation/GlobalExceptionHandlers.cs b/src/NzbDrone.Common/Instrumentation/GlobalExceptionHandlers.cs index 6f778d7de..50ede78a5 100644 --- a/src/NzbDrone.Common/Instrumentation/GlobalExceptionHandlers.cs +++ b/src/NzbDrone.Common/Instrumentation/GlobalExceptionHandlers.cs @@ -38,16 +38,6 @@ namespace NzbDrone.Common.Instrumentation return; } - if (PlatformInfo.IsMono) - { - if ((exception is TypeInitializationException && exception.InnerException is DllNotFoundException) || - exception is DllNotFoundException) - { - Logger.Debug(exception, "Minor Fail: " + exception.Message); - return; - } - } - Console.WriteLine("EPIC FAIL: {0}", exception); Logger.Fatal(exception, "EPIC FAIL."); } diff --git a/src/NzbDrone.Common/Instrumentation/Sentry/SentryTarget.cs b/src/NzbDrone.Common/Instrumentation/Sentry/SentryTarget.cs index 823d051ab..8832b6251 100644 --- a/src/NzbDrone.Common/Instrumentation/Sentry/SentryTarget.cs +++ b/src/NzbDrone.Common/Instrumentation/Sentry/SentryTarget.cs @@ -106,13 +106,6 @@ namespace NzbDrone.Common.Instrumentation.Sentry o.Debug = false; o.DiagnosticLevel = SentryLevel.Debug; o.Release = BuildInfo.Release; - if (PlatformInfo.IsMono) - { - // Mono 6.0 broke GzipStream.WriteAsync - // TODO: Check specific version - o.RequestBodyCompressionLevel = System.IO.Compression.CompressionLevel.NoCompression; - } - o.BeforeSend = x => SentryCleanser.CleanseEvent(x); o.BeforeBreadcrumb = x => SentryCleanser.CleanseBreadcrumb(x); o.Environment = BuildInfo.Branch; @@ -155,7 +148,7 @@ namespace NzbDrone.Common.Instrumentation.Sentry { scope.SetTag("is_docker", $"{osInfo.IsDocker}"); - if (osInfo.Name != null && PlatformInfo.IsMono) + if (osInfo.Name != null && !OsInfo.IsWindows) { // Sentry auto-detection of non-Windows platforms isn't that accurate on certain devices. scope.Contexts.OperatingSystem.Name = osInfo.Name.FirstCharToUpper(); diff --git a/src/NzbDrone.Common/Processes/ProcessProvider.cs b/src/NzbDrone.Common/Processes/ProcessProvider.cs index b55668200..953450aaa 100644 --- a/src/NzbDrone.Common/Processes/ProcessProvider.cs +++ b/src/NzbDrone.Common/Processes/ProcessProvider.cs @@ -366,11 +366,6 @@ namespace NzbDrone.Common.Processes private (string Path, string Args) GetPathAndArgs(string path, string args) { - if (PlatformInfo.IsMono && path.EndsWith(".exe", StringComparison.InvariantCultureIgnoreCase)) - { - return ("mono", $"--debug {path} {args}"); - } - if (OsInfo.IsWindows && path.EndsWith(".bat", StringComparison.InvariantCultureIgnoreCase)) { return ("cmd.exe", $"/c {path} {args}"); diff --git a/src/NzbDrone.Test.Common/NzbDroneRunner.cs b/src/NzbDrone.Test.Common/NzbDroneRunner.cs index 0a7251fc9..8ea3dd5ce 100644 --- a/src/NzbDrone.Test.Common/NzbDroneRunner.cs +++ b/src/NzbDrone.Test.Common/NzbDroneRunner.cs @@ -44,10 +44,6 @@ namespace NzbDrone.Test.Common { consoleExe = "Prowlarr.Console.exe"; } - else if (PlatformInfo.IsMono) - { - consoleExe = "Prowlarr.exe"; - } else { consoleExe = "Prowlarr";