mirror of
https://github.com/Readarr/Readarr
synced 2025-12-28 11:13:22 +01:00
Increased max redirects from 3 to 5
closes #3449 (cherry picked from commit d421ff973692a35d55e3773b2dc82e0a0d717546)
This commit is contained in:
parent
79dfd8f14d
commit
9ddd08b0de
1 changed files with 3 additions and 1 deletions
|
|
@ -27,6 +27,8 @@ HttpResponse<T> Post<T>(HttpRequest request)
|
|||
|
||||
public class HttpClient : IHttpClient
|
||||
{
|
||||
private const int MaxRedirects = 5;
|
||||
|
||||
private readonly Logger _logger;
|
||||
private readonly IRateLimitService _rateLimitService;
|
||||
private readonly ICached<CookieContainer> _cookieContainerCache;
|
||||
|
|
@ -66,7 +68,7 @@ public HttpResponse Execute(HttpRequest request)
|
|||
|
||||
_logger.Trace("Redirected to {0}", request.Url);
|
||||
|
||||
if (autoRedirectChain.Count > 3)
|
||||
if (autoRedirectChain.Count > MaxRedirects)
|
||||
{
|
||||
throw new WebException($"Too many automatic redirections were attempted for {autoRedirectChain.Join(" -> ")}", WebExceptionStatus.ProtocolError);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue