fix compiler warning ASP0019: Use IHeaderDictionary.Append or the indexer to append or set headers.

This commit is contained in:
sbwalker 2023-10-18 17:09:19 -04:00
parent 162841feb8
commit 30419cec12

View File

@ -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());
}
}