|
|
@ -216,7 +216,7 @@ namespace NzbDrone.Common.Http
|
|
|
|
|
|
|
|
|
|
|
|
private void HandleResponseCookies(HttpResponse response, CookieContainer cookieContainer)
|
|
|
|
private void HandleResponseCookies(HttpResponse response, CookieContainer cookieContainer)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var cookieHeaders = response.Cookies;
|
|
|
|
var cookieHeaders = response.GetCookieHeaders();
|
|
|
|
if (cookieHeaders.Empty())
|
|
|
|
if (cookieHeaders.Empty())
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
return;
|
|
|
@ -228,11 +228,11 @@ namespace NzbDrone.Common.Http
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var persistentCookieContainer = _cookieContainerCache.Get("container", () => new CookieContainer());
|
|
|
|
var persistentCookieContainer = _cookieContainerCache.Get("container", () => new CookieContainer());
|
|
|
|
|
|
|
|
|
|
|
|
foreach (Cookie cookieHeader in cookieHeaders)
|
|
|
|
foreach (var cookieHeader in cookieHeaders)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
try
|
|
|
|
try
|
|
|
|
{
|
|
|
|
{
|
|
|
|
persistentCookieContainer.Add((Uri)response.Request.Url, cookieHeader);
|
|
|
|
persistentCookieContainer.SetCookies((Uri)response.Request.Url, cookieHeader);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
catch (Exception ex)
|
|
|
|
catch (Exception ex)
|
|
|
|
{
|
|
|
|
{
|
|
|
|