mirror of
https://github.com/velopack/velopack.git
synced 2025-10-25 15:19:22 +00:00
Fix build warning (tests do not enable nullable)
This commit is contained in:
@@ -9,7 +9,6 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace Velopack.Sources
|
||||
{
|
||||
|
||||
/// <inheritdoc cref="IFileDownloader"/>
|
||||
public class HttpClientFileDownloader : IFileDownloader
|
||||
{
|
||||
@@ -72,7 +71,7 @@ namespace Velopack.Sources
|
||||
{
|
||||
// https://stackoverflow.com/a/46497896/184746
|
||||
// Get the http headers first to examine the content length
|
||||
using var response = await client.GetAsync(requestUri, HttpCompletionOption.ResponseHeadersRead).ConfigureAwait(false);
|
||||
using var response = await client.GetAsync(requestUri, HttpCompletionOption.ResponseHeadersRead, cancelToken).ConfigureAwait(false);
|
||||
response.EnsureSuccessStatusCode();
|
||||
|
||||
var contentLength = response.Content.Headers.ContentLength;
|
||||
|
||||
@@ -7,7 +7,7 @@ public class FakeDownloader : IFileDownloader
|
||||
{
|
||||
public string LastUrl { get; private set; }
|
||||
public string LastLocalFile { get; private set; }
|
||||
public IDictionary<string, string>? LastHeaders { get; private set; }
|
||||
public IDictionary<string, string> LastHeaders { get; private set; } = new Dictionary<string, string>();
|
||||
public byte[] MockedResponseBytes { get; set; } = [];
|
||||
public bool WriteMockLocalFile { get; set; } = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user