mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
Fixed: RestClient does not use global proxy settings
Co-Authored-By: Petr Shurgalin <pshurgal@users.noreply.github.com> Co-Authored-By: taloth <taloth@users.noreply.github.com>
This commit is contained in:
@@ -28,6 +28,8 @@ namespace NzbDrone.Common.Http
|
||||
|
||||
public class HttpClient : IHttpClient
|
||||
{
|
||||
private const int MaxRedirects = 5;
|
||||
|
||||
private readonly Logger _logger;
|
||||
private readonly IRateLimitService _rateLimitService;
|
||||
private readonly ICached<CookieContainer> _cookieContainerCache;
|
||||
@@ -70,7 +72,7 @@ namespace NzbDrone.Common.Http
|
||||
|
||||
_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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user