From 30419cec1237d06cce8b1ad88a1620cfbb72291f Mon Sep 17 00:00:00 2001 From: sbwalker Date: Wed, 18 Oct 2023 17:09:19 -0400 Subject: [PATCH] fix compiler warning ASP0019: Use IHeaderDictionary.Append or the indexer to append or set headers. --- Oqtane.Server/Pages/Files.cshtml.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Oqtane.Server/Pages/Files.cshtml.cs b/Oqtane.Server/Pages/Files.cshtml.cs index ab65c32c..f47ce1d2 100644 --- a/Oqtane.Server/Pages/Files.cshtml.cs +++ b/Oqtane.Server/Pages/Files.cshtml.cs @@ -3,6 +3,7 @@ using System.IO; using System.Net; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http.Extensions; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; @@ -96,7 +97,7 @@ namespace Oqtane.Pages } else { - HttpContext.Response.Headers.Add(HeaderNames.ETag, etag); + HttpContext.Response.Headers.Append(HeaderNames.ETag, etag); return PhysicalFile(filepath, file.GetMimeType()); } }