update httplistener

This commit is contained in:
Luke Pulverenti
2015-11-02 14:29:40 -05:00
parent 4503ec6174
commit f6c8e5b4d6
7 changed files with 38 additions and 40 deletions

View File

@@ -164,22 +164,9 @@ namespace MediaBrowser.Common.Implementations.HttpClientManager
}
}
//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())