Skip to content

Commit e4eff9c

Browse files
author
Bart Koelman
committed
Removed workaround for dotnet/aspnetcore#32097
1 parent 9d8fb86 commit e4eff9c

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

src/JsonApiDotNetCore/Middleware/JsonApiMiddleware.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
using JsonApiDotNetCore.Serialization.Objects;
1212
using Microsoft.AspNetCore.Http;
1313
using Microsoft.AspNetCore.Http.Extensions;
14-
using Microsoft.AspNetCore.Http.Features;
1514
using Microsoft.AspNetCore.Mvc.Controllers;
1615
using Microsoft.AspNetCore.Routing;
1716
using Microsoft.Extensions.Logging;
@@ -130,8 +129,6 @@ private static async Task<bool> ValidateContentTypeHeaderAsync(string allowedCon
130129
{
131130
string? contentType = httpContext.Request.ContentType;
132131

133-
// ReSharper disable once ConditionIsAlwaysTrueOrFalse
134-
// Justification: Workaround for https://github.com/dotnet/aspnetcore/issues/32097 (fixed in .NET 6)
135132
if (contentType != null && contentType != allowedContentType)
136133
{
137134
await FlushResponseAsync(httpContext.Response, serializerOptions, new ErrorObject(HttpStatusCode.UnsupportedMediaType)

0 commit comments

Comments
 (0)