mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
Merge web results classes into single class and update usages
This commit is contained in:
@@ -75,7 +75,7 @@ namespace Jackett.Common.Utils.Clients
|
||||
ServicePointManager.SecurityProtocol = (SecurityProtocolType)192 | (SecurityProtocolType)768 | (SecurityProtocolType)3072;
|
||||
}
|
||||
|
||||
protected override async Task<WebClientByteResult> Run(WebRequest webRequest)
|
||||
protected override async Task<WebResult> Run(WebRequest webRequest)
|
||||
{
|
||||
HttpResponseMessage response = null;
|
||||
var request = new HttpRequestMessage();
|
||||
@@ -143,7 +143,7 @@ namespace Jackett.Common.Utils.Clients
|
||||
|
||||
response = await client.SendAsync(request);
|
||||
|
||||
var result = new WebClientByteResult
|
||||
var result = new WebResult
|
||||
{
|
||||
ContentBytes = await response.Content.ReadAsByteArrayAsync()
|
||||
};
|
||||
@@ -173,7 +173,7 @@ namespace Jackett.Common.Utils.Clients
|
||||
redirval = value.Substring(start + 1);
|
||||
result.RedirectingTo = redirval;
|
||||
// normally we don't want a serviceunavailable (503) to be a redirect, but that's the nature
|
||||
// of this cloudflare approach..don't want to alter BaseWebResult.IsRedirect because normally
|
||||
// of this cloudflare approach..don't want to alter WebResult.IsRedirect because normally
|
||||
// it shoudln't include service unavailable..only if we have this redirect header.
|
||||
response.StatusCode = System.Net.HttpStatusCode.Redirect;
|
||||
redirtime = int.Parse(value.Substring(0, end));
|
||||
|
Reference in New Issue
Block a user