mirror of
https://github.com/Prowlarr/Prowlarr
synced 2026-04-17 02:10:48 +02:00
Fixed: (Cardigann) Use cookies from captcha response
This commit is contained in:
parent
972ee8f6a9
commit
ab5b799ecf
1 changed files with 6 additions and 1 deletions
|
|
@ -666,7 +666,7 @@ private async Task<Captcha> GetCaptcha(LoginBlock login)
|
|||
var captchaUrl = ResolvePath(captchaElement.GetAttribute("src"), loginUrl);
|
||||
|
||||
var request = new HttpRequestBuilder(captchaUrl.ToString())
|
||||
.SetCookies(landingResult.GetCookies())
|
||||
.SetCookies(Cookies ?? new Dictionary<string, string>())
|
||||
.SetHeaders(headers ?? new Dictionary<string, string>())
|
||||
.SetHeader("Referer", loginUrl.AbsoluteUri)
|
||||
.SetEncoding(_encoding)
|
||||
|
|
@ -675,6 +675,11 @@ private async Task<Captcha> GetCaptcha(LoginBlock login)
|
|||
|
||||
var response = await HttpClient.ExecuteProxiedAsync(request, Definition);
|
||||
|
||||
if (response.GetCookies().Any())
|
||||
{
|
||||
Cookies = response.GetCookies();
|
||||
}
|
||||
|
||||
return new Captcha
|
||||
{
|
||||
ContentType = response.Headers.ContentType,
|
||||
|
|
|
|||
Loading…
Reference in a new issue