updated nuget

This commit is contained in:
Luke Pulverenti
2014-12-01 07:43:34 -05:00
parent d7bdb744ca
commit dc8fb33a1f
33 changed files with 368 additions and 270 deletions

View File

@@ -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())