mirror of
https://github.com/Jackett/Jackett
synced 2025-02-24 23:22:46 +00:00
Fixed TorrentDay login, fixed nested redirect loops
This commit is contained in:
parent
a0fd1db52e
commit
9c03f0c35e
2 changed files with 3 additions and 5 deletions
|
@ -296,11 +296,8 @@ namespace Jackett.Indexers
|
|||
var response = await webclient.GetString(request);
|
||||
var firstCallCookies = response.Cookies;
|
||||
|
||||
// Follow up to 5 redirects
|
||||
for(int i = 0; i < 5; i++)
|
||||
if (response.IsRedirect)
|
||||
{
|
||||
if (!response.IsRedirect)
|
||||
break;
|
||||
await FollowIfRedirect(response, request.Url, null, response.Cookies);
|
||||
}
|
||||
|
||||
|
|
|
@ -20,7 +20,8 @@ namespace Jackett.Utils.Clients
|
|||
return Status == System.Net.HttpStatusCode.Redirect ||
|
||||
Status == System.Net.HttpStatusCode.RedirectKeepVerb ||
|
||||
Status == System.Net.HttpStatusCode.RedirectMethod ||
|
||||
Status == System.Net.HttpStatusCode.Found;
|
||||
Status == System.Net.HttpStatusCode.Found ||
|
||||
Status == System.Net.HttpStatusCode.MovedPermanently;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue