Fixed: Changes in http redirect logic causing failed grabs and >25% cpu usage.

This commit is contained in:
Taloth Saldono 2017-08-09 23:03:31 +02:00 committed by Qstick
parent 25f08bd846
commit 2fc58115a0
3 changed files with 34 additions and 18 deletions

View file

@ -35,7 +35,7 @@ namespace NzbDrone.Common.Http
private string _content;
public string Content
public string Content
{
get
{
@ -51,6 +51,10 @@ namespace NzbDrone.Common.Http
public bool HasHttpError => (int)StatusCode >= 400;
public bool HasHttpRedirect => StatusCode == HttpStatusCode.Moved ||
StatusCode == HttpStatusCode.MovedPermanently ||
StatusCode == HttpStatusCode.Found;
public Dictionary<string, string> GetCookies()
{
var result = new Dictionary<string, string>();
@ -95,4 +99,4 @@ namespace NzbDrone.Common.Http
public T Resource { get; private set; }
}
}
}