fix custom certificate validation handler (#3297)

* fix netcore custom certificate validator

* conditional HttpWebClientNetCore register

* deprecate IgnoreSslErrors option

* Use httpclient when running full framework
This commit is contained in:
kaso17
2018-07-02 13:05:24 +02:00
committed by GitHub
parent bc965b1a0c
commit bcc1dc1948
5 changed files with 332 additions and 4 deletions

View File

@@ -14,7 +14,7 @@ using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
namespace Jackett.Server
{
@@ -48,7 +48,16 @@ namespace Jackett.Server
if (string.IsNullOrEmpty(options.Client))
{
//TODO: Remove libcurl once off owin
options.Client = "httpclient";
bool runningOnDotNetCore = RuntimeInformation.FrameworkDescription.IndexOf("Core", StringComparison.OrdinalIgnoreCase) >= 0;
if (runningOnDotNetCore)
{
options.Client = "httpclientnetcore";
}
else
{
options.Client = "httpclient";
}
}
Settings = options.ToRunTimeSettings();