mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-16 10:03:51 -07:00
Fixed: Changes in http redirect logic causing failed grabs and >25% cpu usage.
This commit is contained in:
parent
25f08bd846
commit
2fc58115a0
3 changed files with 34 additions and 18 deletions
|
@ -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; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue