1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-27 22:57:09 -04:00

Better Captcha message.

This commit is contained in:
Taloth Saldono
2016-08-20 19:37:31 +02:00
parent 28f6777f9a
commit 7f6101a6bc
4 changed files with 30 additions and 5 deletions
@@ -15,5 +15,10 @@ namespace NzbDrone.Core.Http.CloudFlare
Response = response;
CaptchaRequest = captchaRequest;
}
public bool IsExpired
{
get { return Response.Request.Cookies.ContainsKey("cf_clearance"); }
}
}
}
@@ -27,7 +27,7 @@ namespace NzbDrone.Core.Http.CloudFlare
{
if (response.StatusCode == HttpStatusCode.Forbidden && response.Content.Contains(_cloudFlareChallengeScript))
{
_logger.Error("CloudFlare CAPTCHA block on {0}", response.Request.Url);
_logger.Debug("CloudFlare CAPTCHA block on {0}", response.Request.Url);
throw new CloudFlareCaptchaException(response, CreateCaptchaRequest(response));
}