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

This commit is contained in:
Leonardo Galli
2018-03-04 16:01:40 +01:00
parent 799a448544
commit a48793edd2
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; }
}
}
}