mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-17 06:23:03 +03:00
updated nuget
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using MediaBrowser.Common.Configuration;
|
||||
using System.Net.Sockets;
|
||||
using MediaBrowser.Common.Configuration;
|
||||
using MediaBrowser.Common.Extensions;
|
||||
using MediaBrowser.Common.IO;
|
||||
using MediaBrowser.Common.Net;
|
||||
@@ -134,9 +135,22 @@ namespace MediaBrowser.Common.Implementations.HttpClientManager
|
||||
request.Referer = options.Referer;
|
||||
}
|
||||
|
||||
request.ServicePoint.BindIPEndPointDelegate = BindIPEndPointCallback;
|
||||
|
||||
return request;
|
||||
}
|
||||
|
||||
private static IPEndPoint BindIPEndPointCallback(ServicePoint servicePoint, IPEndPoint remoteEndPoint, int retryCount)
|
||||
{
|
||||
// Prefer local ipv4
|
||||
if (remoteEndPoint.AddressFamily == AddressFamily.InterNetworkV6)
|
||||
{
|
||||
return new IPEndPoint(IPAddress.IPv6Any, 0);
|
||||
}
|
||||
|
||||
return new IPEndPoint(IPAddress.Any, 0);
|
||||
}
|
||||
|
||||
private void AddRequestHeaders(HttpWebRequest request, HttpRequestOptions options)
|
||||
{
|
||||
foreach (var header in options.RequestHeaders.ToList())
|
||||
|
||||
Reference in New Issue
Block a user