mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
Passwords inputs are now the correct type. Fix configure_indexer not returning errors. Fix build warning. Change AB, HDT, MTTV, PHD, ST to use generic web client.
This commit is contained in:
@@ -37,12 +37,25 @@ namespace Jackett.Utils.Clients
|
||||
response = await CurlHelper.PostAsync(request.Url, request.PostData, request.Cookies, request.Referer);
|
||||
}
|
||||
|
||||
return new WebClientByteResult()
|
||||
var result = new WebClientByteResult()
|
||||
{
|
||||
Content = response.Content,
|
||||
Cookies = response.CookieHeader,
|
||||
Status = response.Status
|
||||
};
|
||||
|
||||
if (response.Headers != null)
|
||||
{
|
||||
foreach(var header in response.Headers)
|
||||
{
|
||||
if(string.Equals(header.Key, "location", StringComparison.InvariantCultureIgnoreCase) && header.Value !=null)
|
||||
{
|
||||
result.RedirectingTo = header.Value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public async Task<WebClientStringResult> GetString(WebRequest request)
|
||||
|
Reference in New Issue
Block a user