diff options
| author | Joshua M. Boniface <joshua@boniface.me> | 2019-07-06 17:01:35 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-07-06 17:01:35 -0400 |
| commit | 4f17ed961e2756e0c65b1bb0246e7f62a5f44a8a (patch) | |
| tree | 7cf5c09548c788d77da61dde6f70d78b0c0f3800 /Jellyfin.Server/Program.cs | |
| parent | 54c6f02ebb40523bda6a6ee2375037146556a0c7 (diff) | |
| parent | 5fc4ad6c4e9aab8246e70a064c8506d050cf2147 (diff) | |
Merge pull request #1514 from Bond-009/httpclient2v10.3.6
Fix issues with HttpClientManager
Diffstat (limited to 'Jellyfin.Server/Program.cs')
| -rw-r--r-- | Jellyfin.Server/Program.cs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Jellyfin.Server/Program.cs b/Jellyfin.Server/Program.cs index d4b10c8c8..95ce08f26 100644 --- a/Jellyfin.Server/Program.cs +++ b/Jellyfin.Server/Program.cs @@ -118,8 +118,20 @@ namespace Jellyfin.Server SQLitePCL.Batteries_V2.Init(); + // Increase the max http request limit + // The default connection limit is 10 for ASP.NET hosted applications and 2 for all others. + ServicePointManager.DefaultConnectionLimit = Math.Max(96, ServicePointManager.DefaultConnectionLimit); + + // Disable the "Expect: 100-Continue" header by default + // http://stackoverflow.com/questions/566437/http-post-returns-the-error-417-expectation-failed-c + ServicePointManager.Expect100Continue = false; + +// CA5359: Do Not Disable Certificate Validation +#pragma warning disable CA5359 + // Allow all https requests ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(delegate { return true; }); +#pragma warning restore CA5359 var fileSystem = new ManagedFileSystem(_loggerFactory, appPaths); |
