Merge pull request #3408 from sbwalker/net8

fix compiler warning ASP0019: Use IHeaderDictionary.Append or the indexer to append or set headers.
This commit is contained in:
Shaun Walker 2023-10-18 17:14:04 -04:00 committed by GitHub
commit 3ef11f5b26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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